<div class="form-container">
<div class="validation-errors" id="validationErrors" style="display:none;"></div>
<div class="walk-register-buttons" style="float: left;">
<a href="<?php echo( base_url() ); ?>cmb/member/home/<?php echo( $urlKey ); ?>/" target="_self">Member Home</a>
->&nbsp<a href="<?php echo( base_url() ); ?>cmb/member_registration/administration/<?php echo( $urlKey ); ?>/" target="_self">Admin Tasks</a>
->&nbsp<a href="<?php echo( base_url() ); ?>mahasamadhi/mahasamadhi_registration/admin_edit_ms_registrations/<?php echo( $urlKey ); ?>/" target="_self">Edit Registrations</a>
</div>
<div class="walk-register-buttons" style="float: right;">
	<a href="<?php echo( base_url() ); ?>cmb/member/homepage_logout/<?php echo( $adminUrlKey ); ?>/"><img src="<?php echo( base_url() ); ?>assets/images/buttons/logout1.gif" border="0" /></a>
</div>
<?php
	Includes::IncludeFile( Includes::$FORM );
	Includes::IncludeFile( Includes::$SPACER );
			
	$accommodation_fee = $this->config->item('msc_accommodation_fee');

	echo( form_open(base_url() . 'mahasamadhi/mahasamadhi_registration/admin_edit_mahasamadhi_registration_process/' .$ms_reg_history_id.'/'.$urlKey, array('id' => 'adminEditMahasamadhiRegForm') ) );

	Spacer::Render(0, 50);
	
	echo('<font color = "blue">'.$loggedinname.' is currently logged in</font>');
	Spacer::Render(0, 30);
	
	$numadult = $ms_registration_value->getNumAdultRegistered();
	$numchild = $ms_registration_value->getNumChildRegistered();
	$numchyk = $ms_registration_value->getNumCHYKRegistered();
	$numbiksha = $ms_registration_value->getNumBiksha();
	$numarathi = $ms_registration_value->getNumArathi();
	$adultInfoArr = $ms_registration_value->getAdultInfo();
	$childInfoArr = $ms_registration_value->getChildInfo();
	$chykInfoArr = $ms_registration_value->getCHYKInfo();

	//Registration info
	Form::OpenFormItem('<b>Select Registration Type:</b>', 260);
		$regtypeoptions = array(''=>'Select','1'=>'Individual','2'=>'Family','3'=>'CHYK');
		echo( form_dropdown('regtype', $regtypeoptions, strval($ms_registration_value->getRegistrationType()), 'id="regtype" style="width: 100px;"  onchange="regTypeChangeHandler();"') );
	Form::CloseFormItem();
	Spacer::Render(0, 20);

	//Individual
	echo('<div id="regtype1" style="display: none; ">');
		echo ( form_label('<font size="2" color="red"><b>Registration Fees (all inclusive)</b></font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: 0 0 0 0; width: 400px;')) );
		Spacer::Render(0, 25);
		echo('<table border="1">');
		echo('<th><center><b><font size="2" color="black">Occupancy</font></center></b></th>');
		echo('<th><center><b><font size="2" color="black">&nbsp&nbspOn/Before 30-April-12&nbsp&nbsp</font></b></center></th>');
		echo('<th><center><b><font size="2" color="red">&nbsp&nbspAfter 30-April-12&nbsp&nbsp</font></b></center></th>');		
		if ($ms_registration_value->getRegistrationCase() == 4)
			echo('<tr><td>'.form_radio('regcaseind', '4', TRUE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;;" onClick="registrationHandler();"').' '.form_label('Single Occupancy (1 King Bed)', '1100', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,100</center></td><td><center><font size="2" color="red">$1,200</font></center></td></tr>');		
		else
			echo('<tr><td>'.form_radio('regcaseind', '4', FALSE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;;" onClick="registrationHandler();"').' '.form_label('Single Occupancy (1 King Bed)', '1100', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,100</center></td><td><center><font size="2" color="red">$1,200</font></center></td></tr>');		

		if ($ms_registration_value->getRegistrationCase() == 1)
			echo('<tr><td>'.form_radio('regcaseind', '1', TRUE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;" onClick="registrationHandler();"').' '.form_label('Double Occupancy (1 King Bed or 2 Double Beds, 2 persons)&nbsp&nbsp', '1300', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,300</br>($650 per person)</center></td><td><center><font size="2" color="red">$1,450</br>($725 per person)</font></center></td></tr>');		
		else
			echo('<tr><td>'.form_radio('regcaseind', '1', FALSE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;" onClick="registrationHandler();"').' '.form_label('Double Occupancy (1 King Bed or 2 Double Beds, 2 persons)&nbsp&nbsp', '1300', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,300</br>($650 per person)</center></td><td><center><font size="2" color="red">$1,450</br>($725 per person)</font></center></td></tr>');		

		echo('</table>');
		Spacer::Render(0, 20);
		echo ( form_label('<font size="1" color="red">1. Registration fees of $150/person included in above rates. Registration fee is tax-deductible</font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -15px 0 0 0; width: 700px;')) );
		echo ( form_label('<font size="1" color="red">2. All cancellations before April 30th will incur an administrative charge of $150 per person that will not be reimbursed</font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -5px 0 0 0; width: 700px;')) );
		echo ( form_label('<font size="1" color="red">3. For double occupancy with one individual selected we will try to place you with a room mate of the same gender</font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -5px 0 0 0; width: 700px;')) );
		echo ( form_label('<font size="1" color="red">4. 50% of total charges will be refunded for all cancellations after April 30th and before July 1st </font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -5px 0 0 0; width: 700px;')) );
		echo ( form_label('<font size="1" color="red">5. No refund of charges after July 1st</font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -5px 0 0 0; width: 700px;')) );
		echo ( form_label('<font size="1" color="red">6. All charges inclusive of camp registration, hotel room charges, and food</font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -5px 0 0 0; width: 700px;')) );

		Spacer::Render(0, 90);

		echo('<b><font size="2" color="red">Individual Attendees</font></b></br>');
		echo('<hr />');
		Form::OpenFormItem("Are you a CMB Balavihar teacher*?:", 260);
			$istchroptions = array('0'=>'No','1'=>'Yes');
			echo( form_dropdown('isteacherind', $istchroptions, $ms_registration_value->getIsTeacher(), 'id="isteacherind" style="width: 70px;"  onchange="sponsorHandler();"') );
		Form::CloseFormItem();
		Form::OpenFormItem('Number of individuals:', 260);
			$numadultoptions = array(''=>'Select','1'=>'1','2'=>'2');
			echo( form_dropdown('numind', $numadultoptions, $numadult, 'id="numind" style="width: 70px;"  onchange="numIndChangeHandler();"') );
		Form::CloseFormItem();
		
		echo('<div id="ind1" style="display: none; ">');
			if ($numadult > 0)
			{
				$adultRec = $adultInfoArr[0];
				Form::OpenFormItem('Primary Individual First Name*:', 260);
					echo( form_input(array('name'=>'indFN1','id'=>'indFN1','value'=>$adultRec['firstname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Primary Individual Last Name*:', 260);
					echo( form_input(array('name'=>'indLN1','id'=>'indLN1','value'=>$adultRec['lastname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				
				Form::OpenFormItem('Primary Individual Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('indG1', $genderOptions, $adultRec['gender'], 'id="indG1" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 30);
				$tmp = explode(",",$adultRec['dietrest'],3);
				if (in_array("Low Sugar",$tmp))
				{
					echo( form_checkbox(array('name'=>'idietrest11','id'=>'idietrest11','value'=>'idietrest11','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','idietrest11',array('class'=>'idietrest11','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'idietrest11','id'=>'idietrest11','value'=>'idietrest11','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','idietrest11',array('class'=>'idietrest11','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );				
				}
	
				if (in_array("Low Fat",$tmp))
				{
					echo( form_checkbox(array('name'=>'idietrest12','id'=>'idietrest12','value'=>'idietrest12','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','idietrest12',array('class'=>'idietrest12','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'idietrest12','id'=>'idietrest12','value'=>'idietrest12','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','idietrest12',array('class'=>'idietrest12','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
	
				if (in_array("Gluten Free",$tmp))
				{
					echo( form_checkbox(array('name'=>'idietrest13','id'=>'idietrest13','value'=>'idietrest13','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','idietrest13',array('class'=>'idietrest13','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'idietrest13','id'=>'idietrest13','value'=>'idietrest13','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','idietrest13',array('class'=>'idietrest13','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa1',array('class'=>'aa1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'ia1','id'=>'ia1','value'=>$adultRec['allergies'],'maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
			else
			{
				Form::OpenFormItem('Primary Individual First Name*:', 260);
					echo( form_input(array('name'=>'indFN1','id'=>'indFN1','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Primary Individual Last Name*:', 260);
					echo( form_input(array('name'=>'indLN1','id'=>'indLN1','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				
				Form::OpenFormItem('Primary Individual Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('indG1', $genderOptions, '', 'id="indG1" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 30);
				echo( form_checkbox(array('name'=>'idietrest11','id'=>'idietrest11','value'=>'idietrest11','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Sugar</font>','idietrest11',array('class'=>'idietrest11','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );				

				echo( form_checkbox(array('name'=>'idietrest12','id'=>'idietrest12','value'=>'idietrest12','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Fat</font>','idietrest12',array('class'=>'idietrest12','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );

				echo( form_checkbox(array('name'=>'idietrest13','id'=>'idietrest13','value'=>'idietrest13','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Gluten Free</font>','idietrest13',array('class'=>'idietrest13','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa1',array('class'=>'aa1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'ia1','id'=>'ia1','maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
		echo('</div>');

		echo('<div id="ind2" style="display: none; ">');
			if ($numadult > 1)
			{
				$adultRec = $adultInfoArr[1];
				Form::OpenFormItem('Individual #2 First Name*:', 260);
					echo( form_input(array('name'=>'indFN2','id'=>'indFN2','value'=>$adultRec['firstname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Individual #2 Last Name*:', 260);
					echo( form_input(array('name'=>'indLN2','id'=>'indLN2','value'=>$adultRec['lastname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Individual #2 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('indG2', $genderOptions, $adultRec['gender'], 'id="indG2" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 5);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 10);
				$tmp = explode(",",$adultRec['dietrest'],3);
				if (in_array("Low Sugar",$tmp))
				{
					echo( form_checkbox(array('name'=>'idietrest21','id'=>'idietrest21','value'=>'idietrest21','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','idietrest21',array('class'=>'idietrest21','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'idietrest21','id'=>'idietrest21','value'=>'idietrest21','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','idietrest21',array('class'=>'idietrest21','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );				
				}
	
				if (in_array("Low Fat",$tmp))
				{
					echo( form_checkbox(array('name'=>'idietrest22','id'=>'idietrest22','value'=>'idietrest22','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','idietrest22',array('class'=>'idietrest22','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'idietrest22','id'=>'idietrest22','value'=>'idietrest22','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','idietrest22',array('class'=>'idietrest22','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
	
				if (in_array("Gluten Free",$tmp))
				{
					echo( form_checkbox(array('name'=>'idietrest23','id'=>'idietrest23','value'=>'idietrest23','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','idietrest23',array('class'=>'idietrest23','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'idietrest23','id'=>'idietrest23','value'=>'idietrest23','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','idietrest23',array('class'=>'idietrest23','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa2',array('class'=>'aa2','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'ia2','id'=>'ia2','value'=>$adultRec['allergies'],'maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
			else
			{
				Form::OpenFormItem('Individual #2 First Name*:', 260);
					echo( form_input(array('name'=>'indFN2','id'=>'indFN2','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Individual #2 Last Name*:', 260);
					echo( form_input(array('name'=>'indLN2','id'=>'indLN2','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Individual #2 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('indG2', $genderOptions, '', 'id="indG2" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 5);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 10);
				echo( form_checkbox(array('name'=>'idietrest21','id'=>'idietrest21','value'=>'idietrest21','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Sugar</font>','idietrest21',array('class'=>'idietrest21','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'idietrest22','id'=>'idietrest22','value'=>'idietrest22','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Fat</font>','idietrest22',array('class'=>'idietrest22','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'idietrest23','id'=>'idietrest23','value'=>'idietrest23','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Gluten Free</font>','idietrest23',array('class'=>'idietrest23','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa2',array('class'=>'aa2','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'ia2','id'=>'ia2','maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
		echo('</div>');
		echo('<hr />');
	echo('</div>');
	
	//Family
	echo('<div id="regtype2" style="display: none; ">');
		echo ( form_label('<font size="2" color="red"><b>Registration Fees (all inclusive)</b></font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: 0 0 0 0; width: 400px;')) );
		Spacer::Render(0, 25);
		echo('<table border="1">');
		echo('<th><center><b><font size="2" color="black">Occupancy</font></center></b></th>');
		echo('<th><center><b><font size="2" color="black">&nbsp&nbspOn/Before 30-April-12&nbsp&nbsp</font></b></center></th>');
		echo('<th><center><b><font size="2" color="red">&nbsp&nbspAfter 30-April-12&nbsp&nbsp</font></b></center></th>');		
		if ($ms_registration_value->getRegistrationCase() == 4)
			echo('<tr><td>'.form_radio('regcasefam', '4', TRUE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;;" onClick="registrationHandler();"').' '.form_label('Single Occupancy (1 King Bed)', '1100', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,100</center></td><td><center><font size="2" color="red">$1,200</font></center></td></tr>');		
		else
			echo('<tr><td>'.form_radio('regcasefam', '4', FALSE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;;" onClick="registrationHandler();"').' '.form_label('Single Occupancy (1 King Bed)', '1100', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,100</center></td><td><center><font size="2" color="red">$1,200</font></center></td></tr>');		

		if ($ms_registration_value->getRegistrationCase() == 1)
			echo('<tr><td>'.form_radio('regcasefam', '1', TRUE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;" onClick="registrationHandler();"').' '.form_label('Double Occupancy (1 King Bed or 2 Double Beds, 2 persons)&nbsp&nbsp', '1300', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,300</br>($650 per person)</center></td><td><center><font size="2" color="red">$1,450</br>($725 per person)</font></center></td></tr>');		
		else
			echo('<tr><td>'.form_radio('regcasefam', '1', FALSE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;" onClick="registrationHandler();"').' '.form_label('Double Occupancy (1 King Bed or 2 Double Beds, 2 persons)&nbsp&nbsp', '1300', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,300</br>($650 per person)</center></td><td><center><font size="2" color="red">$1,450</br>($725 per person)</font></center></td></tr>');		

		if ($ms_registration_value->getRegistrationCase() == 2)
			echo('<tr><td>'.form_radio('regcasefam', '2', TRUE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;" onClick="registrationHandler();"').' '.form_label('Triple Occupancy (2 Double Beds, 3 persons)', '1600', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,600</br>($533 per person)</center></td><td><center><font size="2" color="red">$1,750</br>($583 per person)</font></center></td></tr>');		
		else
			echo('<tr><td>'.form_radio('regcasefam', '2', FALSE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;" onClick="registrationHandler();"').' '.form_label('Triple Occupancy (2 Double Beds, 3 persons)', '1600', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,600</br>($533 per person)</center></td><td><center><font size="2" color="red">$1,750</br>($583 per person)</font></center></td></tr>');		

		if ($ms_registration_value->getRegistrationCase() == 3)
			echo('<tr><td>'.form_radio('regcasefam', '3', TRUE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;" onClick="registrationHandler();"').' '.form_label('Quad Occupancy (2 Double Beds, 4 persons)', '1750', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,750</br>($438 per person)</center></td><td><center><font size="2" color="red">$1,900</br>($475 per person)</font></center></td></tr>');		
		else
			echo('<tr><td>'.form_radio('regcasefam', '3', FALSE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;" onClick="registrationHandler();"').' '.form_label('Quad Occupancy (2 Double Beds, 4 persons)', '1750', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,750</br>($438 per person)</center></td><td><center><font size="2" color="red">$1,900</br>($475 per person)</font></center></td></tr>');		

		echo('<tr><td></td><td></td></tr>');		
		echo('</table>');
		Spacer::Render(0, 20);
		echo ( form_label('<font size="1" color="red">1. Registration fees of $150/person included in above rates. Registration fee is tax-deductible</font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -15px 0 0 0; width: 700px;')) );
		echo ( form_label('<font size="1" color="red">2. All cancellations before April 30th will incur an administrative charge of $150 per person that will not be reimbursed</font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -5px 0 0 0; width: 700px;')) );
		echo ( form_label('<font size="1" color="red">3. 50% of total charges will be refunded for all cancellations after April 30th and before July 1st </font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -5px 0 0 0; width: 700px;')) );
		echo ( form_label('<font size="1" color="red">4. No refund of charges after July 1st</font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -5px 0 0 0; width: 700px;')) );
		echo ( form_label('<font size="1" color="red">5. All charges inclusive of camp registration, hotel room charges, and food</font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -5px 0 0 0; width: 700px;')) );

		Spacer::Render(0, 90);
	
		echo('<b><font size="2" color="red">Adult Attendees</font></b></br>');
		echo('<hr />');
		Form::OpenFormItem("Are you a CMB Balavihar teacher*?:", 260);
			$istchroptions = array('0'=>'No','1'=>'Yes');
			echo( form_dropdown('isteacherfam', $istchroptions, $ms_registration_value->getIsTeacher(), 'id="isteacherfam" style="width: 70px;"  onchange="sponsorHandler();"') );
		Form::CloseFormItem();
		Form::OpenFormItem('Number of adults:', 260);
			$numadultoptions = array(''=>'Select','1'=>'1','2'=>'2','3'=>'3');
			echo( form_dropdown('numadult', $numadultoptions, $numadult, 'id="numadult" style="width: 70px;"  onchange="numAdultChangeHandler();"') );
		Form::CloseFormItem();
		echo('<div id="adult1" style="display: none; ">');
			if ($numadult > 0)
			{
				Form::OpenFormItem('Primary Adult First Name*:', 260);
					$adultRec = $adultInfoArr[0];
					echo( form_input(array('name'=>'adultFN1','id'=>'adultFN1','value'=>$adultRec['firstname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Primary Adult Last Name*:', 260);
					echo( form_input(array('name'=>'adultLN1','id'=>'adultLN1','value'=>$adultRec['lastname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				
				Form::OpenFormItem('Primary Adult Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('adultG1', $genderOptions, $adultRec['gender'], 'id="adultG1" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 30);
				$tmp = explode(",",$adultRec['dietrest'],3);
				if (in_array("Low Sugar",$tmp))
				{
					echo( form_checkbox(array('name'=>'adietrest11','id'=>'adietrest11','value'=>'adietrest11','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','adietrest11',array('class'=>'adietrest11','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'adietrest11','id'=>'adietrest11','value'=>'adietrest11','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','adietrest11',array('class'=>'adietrest11','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );				
				}
	
				if (in_array("Low Fat",$tmp))
				{
					echo( form_checkbox(array('name'=>'adietrest12','id'=>'adietrest12','value'=>'adietrest12','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','adietrest12',array('class'=>'adietrest12','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'adietrest12','id'=>'adietrest12','value'=>'adietrest12','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','adietrest12',array('class'=>'adietrest12','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
	
				if (in_array("Gluten Free",$tmp))
				{
					echo( form_checkbox(array('name'=>'adietrest13','id'=>'adietrest13','value'=>'adietrest13','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','adietrest13',array('class'=>'adietrest13','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'adietrest13','id'=>'adietrest13','value'=>'adietrest13','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','adietrest13',array('class'=>'adietrest13','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
	
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa1',array('class'=>'aa1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'aa1','id'=>'aa1','value'=>$adultRec['allergies'],'maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
			else
			{			
				Form::OpenFormItem('Primary Adult First Name*:', 260);
					echo( form_input(array('name'=>'adultFN1','id'=>'adultFN1','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Primary Adult Last Name*:', 260);
					echo( form_input(array('name'=>'adultLN1','id'=>'adultLN1','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				
				Form::OpenFormItem('Primary Adult Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('adultG1', $genderOptions, '', 'id="adultG1" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 30);
				echo( form_checkbox(array('name'=>'adietrest11','id'=>'adietrest11','value'=>'adietrest11','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Sugar</font>','adietrest11',array('class'=>'adietrest11','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );				
				
				echo( form_checkbox(array('name'=>'adietrest12','id'=>'adietrest12','value'=>'adietrest12','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Fat</font>','adietrest12',array('class'=>'adietrest12','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
	
				echo( form_checkbox(array('name'=>'adietrest13','id'=>'adietrest13','value'=>'adietrest13','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Gluten Free</font>','adietrest13',array('class'=>'adietrest13','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );

				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa1',array('class'=>'aa1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'aa1','id'=>'aa1','maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
		echo('</div>');

		echo('<div id="adult2" style="display: none; ">');
			if ($numadult > 1)
			{
				Form::OpenFormItem('Adult #2 First Name*:', 260);
					$adultRec = $adultInfoArr[1];
					echo( form_input(array('name'=>'adultFN2','id'=>'adultFN2','value'=>$adultRec['firstname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Adult #2 Last Name*:', 260);
					echo( form_input(array('name'=>'adultLN2','id'=>'adultLN2','value'=>$adultRec['lastname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				
				Form::OpenFormItem('Adult #2 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('adultG2', $genderOptions, $adultRec['gender'], 'id="adultG2" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 30);
				$tmp = explode(",",$adultRec['dietrest'],3);
				if (in_array("Low Sugar",$tmp))
				{
					echo( form_checkbox(array('name'=>'adietrest21','id'=>'adietrest21','value'=>'adietrest21','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','adietrest21',array('class'=>'adietrest21','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'adietrest21','id'=>'adietrest21','value'=>'adietrest21','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','adietrest21',array('class'=>'adietrest21','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );				
				}
	
				if (in_array("Low Fat",$tmp))
				{
					echo( form_checkbox(array('name'=>'adietrest22','id'=>'adietrest22','value'=>'adietrest22','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','adietrest22',array('class'=>'adietrest22','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'adietrest22','id'=>'adietrest22','value'=>'adietrest22','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','adietrest22',array('class'=>'adietrest22','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
	
				if (in_array("Gluten Free",$tmp))
				{
					echo( form_checkbox(array('name'=>'adietrest23','id'=>'adietrest23','value'=>'adietrest23','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','adietrest23',array('class'=>'adietrest23','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'adietrest23','id'=>'adietrest23','value'=>'adietrest23','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','adietrest23',array('class'=>'adietrest23','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
	
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa1',array('class'=>'aa1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'aa2','id'=>'aa2','value'=>$adultRec['allergies'],'maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
			else
			{
				Form::OpenFormItem('Adult #2 First Name*:', 260);
					echo( form_input(array('name'=>'adultFN2','id'=>'adultFN2','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Adult #2 Last Name*:', 260);
					echo( form_input(array('name'=>'adultLN2','id'=>'adultLN2','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				
				Form::OpenFormItem('Adult #2 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('adultG2', $genderOptions, '', 'id="adultG2" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 30);

				echo( form_checkbox(array('name'=>'adietrest21','id'=>'adietrest21','value'=>'adietrest21','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Sugar</font>','adietrest21',array('class'=>'adietrest21','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );				

				echo( form_checkbox(array('name'=>'adietrest22','id'=>'adietrest22','value'=>'adietrest22','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Fat</font>','adietrest22',array('class'=>'adietrest22','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );

				echo( form_checkbox(array('name'=>'adietrest23','id'=>'adietrest23','value'=>'adietrest23','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Gluten Free</font>','adietrest23',array('class'=>'adietrest23','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
	
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa1',array('class'=>'aa1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'aa2','id'=>'aa2','maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');				
			}
		echo('</div>');

		echo('<div id="adult3" style="display: none; ">');
			if ($numadult > 2)
			{
				Form::OpenFormItem('Adult #3 First Name*:', 260);
					$adultRec = $adultInfoArr[2];
					echo( form_input(array('name'=>'adultFN3','id'=>'adultFN3','value'=>$adultRec['firstname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Adult #3 Last Name*:', 260);
					echo( form_input(array('name'=>'adultLN3','id'=>'adultLN3','value'=>$adultRec['lastname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				
				Form::OpenFormItem('Adult #3 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('adultG3', $genderOptions, $adultRec['gender'], 'id="adultG3" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 30);
				$tmp = explode(",",$adultRec['dietrest'],3);
				if (in_array("Low Sugar",$tmp))
				{
					echo( form_checkbox(array('name'=>'adietrest31','id'=>'adietrest31','value'=>'adietrest31','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','adietrest31',array('class'=>'adietrest231','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'adietrest31','id'=>'adietrest31','value'=>'adietrest31','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','adietrest31',array('class'=>'adietrest31','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );				
				}
	
				if (in_array("Low Fat",$tmp))
				{
					echo( form_checkbox(array('name'=>'adietrest32','id'=>'adietrest32','value'=>'adietrest32','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','adietrest32',array('class'=>'adietrest32','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'adietrest32','id'=>'adietrest32','value'=>'adietrest32','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','adietrest32',array('class'=>'adietrest32','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
	
				if (in_array("Gluten Free",$tmp))
				{
					echo( form_checkbox(array('name'=>'adietrest33','id'=>'adietrest33','value'=>'adietrest33','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','adietrest33',array('class'=>'adietrest33','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'adietrest33','id'=>'adietrest33','value'=>'adietrest33','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','adietrest33',array('class'=>'adietrest33','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
	
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa1',array('class'=>'aa1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'aa3','id'=>'aa3','value'=>$adultRec['allergies'],'maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
			else
			{
				Form::OpenFormItem('Adult #3 First Name*:', 260);
					echo( form_input(array('name'=>'adultFN3','id'=>'adultFN3','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Adult #3 Last Name*:', 260);
					echo( form_input(array('name'=>'adultLN3','id'=>'adultLN3','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				
				Form::OpenFormItem('Adult #3 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('adultG3', $genderOptions,'', 'id="adultG3" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 30);
					
				echo( form_checkbox(array('name'=>'adietrest31','id'=>'adietrest31','value'=>'adietrest31','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Sugar</font>','adietrest31',array('class'=>'adietrest31','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );				

				echo( form_checkbox(array('name'=>'adietrest32','id'=>'adietrest32','value'=>'adietrest32','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Fat</font>','adietrest32',array('class'=>'adietrest32','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );

				echo( form_checkbox(array('name'=>'adietrest33','id'=>'adietrest33','value'=>'adietrest33','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Gluten Free</font>','adietrest33',array('class'=>'adietrest33','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
	
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa1',array('class'=>'aa1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'aa3','id'=>'aa3','maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');				
			}
		echo('</div>');
		
		Spacer::Render(0, 20);
		
		echo('<b><font size="2" color="red">CHYK/Children in Family</font></b></br>');
		echo('<hr />');
		Form::OpenFormItem('Number of CHYK and children registering as part of the family:', 430);
			$numchildoptions = array(''=>'Select','1'=>'1','2'=>'2','3'=>'3');
			echo( form_dropdown('numchild', $numchildoptions, $numchild, 'id="numchild" style="width: 70px;"  onchange="numChildChangeHandler();"') );
		Form::CloseFormItem();
		
		echo('<div id="child1" style="display: none; ">');
			if ($numchild > 0)
			{
				$childRec = $childInfoArr[0];
				Form::OpenFormItem('Child/CHYK #1 First Name*:', 260);
					echo( form_input(array('name'=>'childFN1','id'=>'childFN1','value'=>$childRec['firstname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #1 Last Name*:', 260);
					echo( form_input(array('name'=>'childLN1','id'=>'childLN1','value'=>$childRec['lastname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #1 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('childG1', $genderOptions, $childRec['gender'], 'id="childG1" style="width: 75px;" ') );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #1 Age*:', 260);
					echo( form_input(array('name'=>'childAge1','id'=>'childAge1','value'=>$childRec['age'],'maxlength'=>'2','style'=>'width: 50px;')) );
				Form::CloseFormItem();
				
				if ($childRec['type'] == 3)
				{
					echo( form_checkbox(array('name'=>'ischyk1','id'=>'ischyk1','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 10px 0 0 -7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Chinmaya Yuva Kendra Member (CHYK, ages 18-28)</font>','ischyk1',array('class'=>'ischyk1','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 6px 0 0 -7px; white-space: nowrap; width: 300px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'ischyk1','id'=>'ischyk1','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 10px 0 0 -7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Chinmaya Yuva Kendra Member (CHYK, ages 18-28)</font>','ischyk1',array('class'=>'ischyk1','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 6px 0 0 -7px; white-space: nowrap; width: 300px;')) );					
				}
				
				Spacer::Render(0, 40);
	
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 10);
				$tmp = explode(",",$childRec['dietrest'],3);
				if (in_array("Low Sugar",$tmp))
				{
					echo( form_checkbox(array('name'=>'cdietrest11','id'=>'cdietrest11','value'=>'cdietrest11','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','cdietrest11',array('class'=>'cdietrest11','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'cdietrest11','id'=>'cdietrest11','value'=>'cdietrest11','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','cdietrest11',array('class'=>'cdietrest11','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );					
				}
								
				if (in_array("Low Fat",$tmp))
				{
					echo( form_checkbox(array('name'=>'cdietrest12','id'=>'cdietrest12','value'=>'cdietrest12','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','cdietrest12',array('class'=>'cdietrest12','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'cdietrest12','id'=>'cdietrest12','value'=>'cdietrest12','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','cdietrest12',array('class'=>'cdietrest12','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );					
				}
				
				if (in_array("Gluten Free",$tmp))
				{
					echo( form_checkbox(array('name'=>'cdietrest13','id'=>'cdietrest13','value'=>'cdietrest13','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','cdietrest13',array('class'=>'cdietrest13','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'cdietrest13','id'=>'cdietrest13','value'=>'cdietrest13','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','cdietrest13',array('class'=>'cdietrest13','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );					
				}
				
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','ca1',array('class'=>'ca1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'ca1','id'=>'ca1','value'=>$childRec['allergies'],'maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
			else
			{
				Form::OpenFormItem('Child/CHYK #1 First Name*:', 260);
					echo( form_input(array('name'=>'childFN1','id'=>'childFN1','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #1 Last Name*:', 260);
					echo( form_input(array('name'=>'childLN1','id'=>'childLN1','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #1 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('childG1', $genderOptions, '', 'id="childG1" style="width: 75px;" ') );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #1 Age*:', 260);
					echo( form_input(array('name'=>'childAge1','id'=>'childAge1','maxlength'=>'2','style'=>'width: 50px;')) );
				Form::CloseFormItem();
				echo( form_checkbox(array('name'=>'ischyk1','id'=>'ischyk1','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 10px 0 0 -7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Chinmaya Yuva Kendra Member (CHYK, ages 18-28)</font>','ischyk1',array('class'=>'ischyk1','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 6px 0 0 -7px; white-space: nowrap; width: 300px;')) );
				Spacer::Render(0, 40);
	
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 10);
				echo( form_checkbox(array('name'=>'cdietrest11','id'=>'cdietrest11','value'=>'cdietrest11','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Sugar</font>','cdietrest11',array('class'=>'cdietrest11','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'cdietrest12','id'=>'cdietrest12','value'=>'cdietrest12','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Fat</font>','cdietrest12',array('class'=>'cdietrest12','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'cdietrest13','id'=>'cdietrest13','value'=>'cdietrest13','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Gluten Free</font>','cdietrest13',array('class'=>'cdietrest13','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','ca1',array('class'=>'ca1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'ca1','id'=>'ca1','maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');				
			}
		echo('</div>');

		echo('<div id="child2" style="display: none; ">');
			if ($numchild > 1)
			{
				$childRec = $childInfoArr[1];
				Form::OpenFormItem('Child/CHYK #2 First Name*:', 260);
					echo( form_input(array('name'=>'childFN2','id'=>'childFN2','value'=>$childRec['firstname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #2 Last Name*:', 260);
					echo( form_input(array('name'=>'childLN2','id'=>'childLN2','value'=>$childRec['lastname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #2 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('childG2', $genderOptions, $childRec['gender'], 'id="childG2" style="width: 75px;" ') );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #2 Age*:', 260);
					echo( form_input(array('name'=>'childAge2','id'=>'childAge2','value'=>$childRec['age'],'maxlength'=>'2','style'=>'width: 50px;')) );
				Form::CloseFormItem();
				
				if ($childRec['type'] == 3)
				{
					echo( form_checkbox(array('name'=>'ischyk2','id'=>'ischyk2','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 10px 0 0 -7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Chinmaya Yuva Kendra Member (CHYK, ages 18-28)</font>','ischyk1',array('class'=>'ischyk1','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 6px 0 0 -7px; white-space: nowrap; width: 300px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'ischyk2','id'=>'ischyk2','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 10px 0 0 -7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Chinmaya Yuva Kendra Member (CHYK, ages 18-28)</font>','ischyk1',array('class'=>'ischyk1','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 6px 0 0 -7px; white-space: nowrap; width: 300px;')) );					
				}
				
				Spacer::Render(0, 40);
	
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 10);
				$tmp = explode(",",$childRec['dietrest'],3);
				if (in_array("Low Sugar",$tmp))
				{
					echo( form_checkbox(array('name'=>'cdietrest21','id'=>'cdietrest21','value'=>'cdietrest21','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','cdietrest21',array('class'=>'cdietrest21','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'cdietrest21','id'=>'cdietrest21','value'=>'cdietrest21','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','cdietrest21',array('class'=>'cdietrest21','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );					
				}
								
				if (in_array("Low Fat",$tmp))
				{
					echo( form_checkbox(array('name'=>'cdietrest22','id'=>'cdietrest22','value'=>'cdietrest22','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','cdietrest22',array('class'=>'cdietrest22','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'cdietrest22','id'=>'cdietrest22','value'=>'cdietrest22','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','cdietrest22',array('class'=>'cdietrest22','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );					
				}
				
				if (in_array("Gluten Free",$tmp))
				{
					echo( form_checkbox(array('name'=>'cdietrest23','id'=>'cdietrest23','value'=>'cdietrest23','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','cdietrest23',array('class'=>'cdietrest23','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'cdietrest23','id'=>'cdietrest23','value'=>'cdietrest23','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','cdietrest23',array('class'=>'cdietrest23','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );					
				}
				
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','ca1',array('class'=>'ca1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'ca2','id'=>'ca2','value'=>$childRec['allergies'],'maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
			else
			{
				Form::OpenFormItem('Child/CHYK #2 First Name*:', 260);
					echo( form_input(array('name'=>'childFN2','id'=>'childFN2','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #2 Last Name*:', 260);
					echo( form_input(array('name'=>'childLN2','id'=>'childLN2','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #2 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('childG2', $genderOptions, '', 'id="childG2" style="width: 75px;" ') );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #2 Age*:', 260);
					echo( form_input(array('name'=>'childAge2','id'=>'childAge2','maxlength'=>'2','style'=>'width: 50px;')) );
				Form::CloseFormItem();
				echo( form_checkbox(array('name'=>'ischyk2','id'=>'ischyk2','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 10px 0 0 -7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Chinmaya Yuva Kendra Member (CHYK, ages 18-28)</font>','ischyk1',array('class'=>'ischyk1','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 6px 0 0 -7px; white-space: nowrap; width: 300px;')) );
				Spacer::Render(0, 40);
	
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 10);
				echo( form_checkbox(array('name'=>'cdietrest21','id'=>'cdietrest21','value'=>'cdietrest21','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Sugar</font>','cdietrest21',array('class'=>'cdietrest21','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'cdietrest22','id'=>'cdietrest22','value'=>'cdietrest22','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Fat</font>','cdietrest22',array('class'=>'cdietrest22','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'cdietrest23','id'=>'cdietrest23','value'=>'cdietrest23','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Gluten Free</font>','cdietrest23',array('class'=>'cdietrest23','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','ca1',array('class'=>'ca1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'ca2','id'=>'ca2','maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');				
			}
		echo('</div>');

		echo('<div id="child3" style="display: none; ">');
			if ($numchild > 2)
			{
				$childRec = $childInfoArr[2];
				Form::OpenFormItem('Child/CHYK #3 First Name*:', 260);
					echo( form_input(array('name'=>'childFN3','id'=>'childFN3','value'=>$childRec['firstname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #3 Last Name*:', 260);
					echo( form_input(array('name'=>'childLN3','id'=>'childLN3','value'=>$childRec['lastname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #3 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('childG3', $genderOptions, $childRec['gender'], 'id="childG3" style="width: 75px;" ') );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #3 Age*:', 260);
					echo( form_input(array('name'=>'childAge3','id'=>'childAge3','value'=>$childRec['age'],'maxlength'=>'2','style'=>'width: 50px;')) );
				Form::CloseFormItem();
				
				if ($childRec['type'] == 3)
				{
					echo( form_checkbox(array('name'=>'ischyk3','id'=>'ischyk3','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 10px 0 0 -7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Chinmaya Yuva Kendra Member (CHYK, ages 18-28)</font>','ischyk1',array('class'=>'ischyk1','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 6px 0 0 -7px; white-space: nowrap; width: 300px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'ischyk2','id'=>'ischyk2','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 10px 0 0 -7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Chinmaya Yuva Kendra Member (CHYK, ages 18-28)</font>','ischyk1',array('class'=>'ischyk1','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 6px 0 0 -7px; white-space: nowrap; width: 300px;')) );					
				}
				
				Spacer::Render(0, 40);
	
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 10);
				$tmp = explode(",",$childRec['dietrest'],3);
				if (in_array("Low Sugar",$tmp))
				{
					echo( form_checkbox(array('name'=>'cdietrest31','id'=>'cdietrest31','value'=>'cdietrest31','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','cdietrest31',array('class'=>'cdietrest31','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'cdietrest31','id'=>'cdietrest31','value'=>'cdietrest31','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','cdietrest31',array('class'=>'cdietrest31','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );					
				}
								
				if (in_array("Low Fat",$tmp))
				{
					echo( form_checkbox(array('name'=>'cdietrest32','id'=>'cdietrest32','value'=>'cdietrest32','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','cdietrest32',array('class'=>'cdietrest32','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'cdietrest32','id'=>'cdietrest32','value'=>'cdietrest32','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','cdietrest32',array('class'=>'cdietrest32','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );					
				}
				
				if (in_array("Gluten Free",$tmp))
				{
					echo( form_checkbox(array('name'=>'cdietrest33','id'=>'cdietrest33','value'=>'cdietrest33','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','cdietrest33',array('class'=>'cdietrest33','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'cdietrest33','id'=>'cdietrest33','value'=>'cdietrest33','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','cdietrest33',array('class'=>'cdietrest33','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );					
				}
				
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','ca1',array('class'=>'ca1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'ca3','id'=>'ca3','value'=>$childRec['allergies'],'maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
			else
			{
				Form::OpenFormItem('Child/CHYK #3 First Name*:', 260);
					echo( form_input(array('name'=>'childFN3','id'=>'childFN3','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #3 Last Name*:', 260);
					echo( form_input(array('name'=>'childLN3','id'=>'childLN3','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #3 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('childG3', $genderOptions, '', 'id="childG3" style="width: 75px;" ') );
				Form::CloseFormItem();
				Form::OpenFormItem('Child/CHYK #3 Age*:', 260);
					echo( form_input(array('name'=>'childAge3','id'=>'childAge3','maxlength'=>'2','style'=>'width: 50px;')) );
				Form::CloseFormItem();
				echo( form_checkbox(array('name'=>'ischyk3','id'=>'ischyk3','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 10px 0 0 -7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Chinmaya Yuva Kendra Member (CHYK, ages 18-28)</font>','ischyk1',array('class'=>'ischyk1','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 6px 0 0 -7px; white-space: nowrap; width: 300px;')) );
				Spacer::Render(0, 40);
	
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 10);
				echo( form_checkbox(array('name'=>'cdietrest31','id'=>'cdietrest31','value'=>'cdietrest31','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Sugar</font>','cdietrest31',array('class'=>'cdietrest31','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'cdietrest32','id'=>'cdietrest32','value'=>'cdietrest32','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Fat</font>','cdietrest32',array('class'=>'cdietrest32','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'cdietrest33','id'=>'cdietrest33','value'=>'cdietrest33','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Gluten Free</font>','cdietrest33',array('class'=>'cdietrest33','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','ca1',array('class'=>'ca1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'ca3','id'=>'ca3','maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');				
			}
		echo('</div>');
		echo('<hr />');
	echo('</div>');

	//CHYK
	echo('<div id="regtype3" style="display: none; ">');
		echo ( form_label('<font size="2" color="red"><b>Registration Fees (all inclusive)</b></font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: 0 0 0 0; width: 400px;')) );
		Spacer::Render(0, 25);
		echo('<table border="1">');
		echo('<th><center><b><font size="2" color="black">Occupancy</font></center></b></th>');
		echo('<th><center><b><font size="2" color="black">&nbsp&nbspOn/Before 30-April-12&nbsp&nbsp</font></b></center></th>');
		echo('<th><center><b><font size="2" color="red">&nbsp&nbspAfter 30-April-12&nbsp&nbsp</font></b></center></th>');		
		if ($ms_registration_value->getRegistrationCase() == 1)
			echo('<tr><td>'.form_radio('regcasechyk', '1', TRUE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;" onClick="registrationHandler();"').' '.form_label('Double Occupancy (1 King Bed or 2 Double Beds, 2 persons)&nbsp&nbsp', '1170', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,170</br>($585 per person)</center></td><td><center><font size="2" color="red">$1,305</br>($652 per person)</font></center></td></tr>');		
		else
			echo('<tr><td>'.form_radio('regcasechyk', '1', FALSE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;" onClick="registrationHandler();"').' '.form_label('Double Occupancy (1 King Bed or 2 Double Beds, 2 persons)&nbsp&nbsp', '1170', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,170</br>($585 per person)</center></td><td><center><font size="2" color="red">$1,305</br>($652 per person)</font></center></td></tr>');		
		
		if ($ms_registration_value->getRegistrationCase() == 2)
			echo('<tr><td>'.form_radio('regcasechyk', '2', TRUE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;" onClick="registrationHandler();"').' '.form_label('Triple Occupancy (2 Double Beds, 3 persons)', '1440', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,440</br>($480 per person)</center></td><td><center><font size="2" color="red">$1,575</br>($525 per person)</font></center></td></tr>');		
		else
			echo('<tr><td>'.form_radio('regcasechyk', '2', FALSE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;" onClick="registrationHandler();"').' '.form_label('Triple Occupancy (2 Double Beds, 3 persons)', '1440', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,440</br>($480 per person)</center></td><td><center><font size="2" color="red">$1,575</br>($525 per person)</font></center></td></tr>');		
		
		if ($ms_registration_value->getRegistrationCase() == 3)
			echo('<tr><td>'.form_radio('regcasechyk', '3', TRUE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;" onClick="registrationHandler();"').' '.form_label('Quad Occupancy (2 Double Beds, 4 persons)', '1575', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,575</br>($394 per person)</center></td><td><center><font size="2" color="red">$1,710</br>($427 per person)</font></center></td></tr>');		
		else
			echo('<tr><td>'.form_radio('regcasechyk', '3', FALSE, 'style="clear: left; display: block; float: left; vertical-align: middle; margin: 3px 0 0 10px; width: 20px;" onClick="registrationHandler();"').' '.form_label('Quad Occupancy (2 Double Beds, 4 persons)', '1575', 'style="display: block; float: left; vertical-align: middle; padding: 0; margin: -4px 0 0 2px; width: 20px;" ').'</td><td><center>$1,575</br>($394 per person)</center></td><td><center><font size="2" color="red">$1,710</br>($427 per person)</font></center></td></tr>');		
		
		echo('<tr><td></td><td></td></tr>');		
		echo('</table>');
		Spacer::Render(0, 20);
		echo ( form_label('<font size="2" color="black">Reflects a CHYK camp discount of 10%</font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -15px 0 0 0; width: 700px;')) );
		Spacer::Render(0, 20);
		echo ( form_label('<font size="1" color="red">1. Registration fees of $150/person included in above rates. Registration fee is tax-deductible</font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -15px 0 0 0; width: 700px;')) );
		echo ( form_label('<font size="1" color="red">2. All cancellations before April 30th will incur an administrative charge of $150 per person that will not be reimbursed</font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -5px 0 0 0; width: 700px;')) );
		echo ( form_label('<font size="1" color="red">3. 50% of total charges will be refunded for all cancellations after April 30th and before July 1st </font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -5px 0 0 0; width: 700px;')) );
		echo ( form_label('<font size="1" color="red">4. No refund of charges after July 1st</font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -5px 0 0 0; width: 700px;')) );
		echo ( form_label('<font size="1" color="red">5. All charges inclusive of camp registration, hotel room charges, and food</font>','intro',array('class'=>'intro','style'=>'display: block; float: left; vertical-align: middle; padding: 0; margin: -5px 0 0 0; width: 700px;')) );

		Spacer::Render(0, 90);

		echo('<b><font size="2" color="red">CHYK Referral</font></b></br>');
		echo('<hr />');
		Form::OpenFormItem("Were you referred to the camp*?:", 260);
			$chykrefoptions = array(''=>'Select','no'=>'No','yes'=>'Yes');
			echo( form_dropdown('chykref', $chykrefoptions, $chykrefflg, 'id="chykref" style="width: 70px;"  onchange="chykRefChangeHandler();"') );
		Form::CloseFormItem();
		echo('<hr />');
		
		echo('<div id="chykreferrer" style="display: none; ">');
			Form::OpenFormItem('Referrer First Name*:', 200);
				echo( form_input(array('name'=>'chykRefFN','id'=>'chykRefFN','value'=>$ms_registration_value->getCHYKRefFirstName(),'maxlength'=>'16','style'=>'width: 250px;')) );
			Form::CloseFormItem();
			Form::OpenFormItem('Referrer Last Name*:', 200);
				echo( form_input(array('name'=>'chykRefLN','id'=>'chykRefLN','value'=>$ms_registration_value->getCHYKRefLastName(),'maxlength'=>'16','style'=>'width: 250px;')) );
			Form::CloseFormItem();			
			echo('<hr style="width:53%; size:10; color:#0000FF;" align="left" />');
		echo('</div>');

		Spacer::Render(0, 20);
		
		echo('<b><font size="2" color="red">CHYK Attendees</font></b></br>');
		echo('<hr />');
		Form::OpenFormItem("Number of CHYK's:", 260);
			$numchykoptions = array(''=>'Select','1'=>'1','2'=>'2','3'=>'3','4'=>'4');
			echo( form_dropdown('numchyk', $numchykoptions, $numchyk, 'id="numchyk" style="width: 70px;"  onchange="numCHYKChangeHandler();"') );
		Form::CloseFormItem();
		echo('<div id="chyk1" style="display: none; ">');
			if ($numchyk > 0)
			{
				$chykRec = $chykInfoArr[0];
				Form::OpenFormItem('Primary CHYK First Name*:', 260);
					echo( form_input(array('name'=>'chykFN1','id'=>'chykFN1','value'=>$chykRec['firstname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Primary CHYK Last Name*:', 260);
					echo( form_input(array('name'=>'chykLN1','id'=>'chykLN1','value'=>$chykRec['lastname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				
				Form::OpenFormItem('CHYK Contact Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('chykG1', $genderOptions, $chykRec['gender'], 'id="chykG1" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 30);
				$tmp = explode(",",$chykRec['dietrest'],3);
				if (in_array("Low Sugar",$tmp))
				{
					echo( form_checkbox(array('name'=>'chdietrest11','id'=>'chdietrest11','value'=>'chdietrest11','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','chdietrest11',array('class'=>'chdietrest11','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'chdietrest11','id'=>'chdietrest11','value'=>'chdietrest11','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','chdietrest11',array('class'=>'chdietrest11','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );				
				}
	
				if (in_array("Low Fat",$tmp))
				{
					echo( form_checkbox(array('name'=>'chdietrest12','id'=>'chdietrest12','value'=>'chdietrest12','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','chdietrest12',array('class'=>'chdietrest12','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'chdietrest12','id'=>'chdietrest12','value'=>'chdietrest12','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','chdietrest12',array('class'=>'chdietrest12','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
	
				if (in_array("Gluten Free",$tmp))
				{
					echo( form_checkbox(array('name'=>'chdietrest13','id'=>'chdietrest13','value'=>'chdietrest13','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','chdietrest13',array('class'=>'chdietrest13','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'chdietrest13','id'=>'chdietrest13','value'=>'chdietrest13','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','chdietrest13',array('class'=>'chdietrest13','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa1',array('class'=>'aa1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'cha1','id'=>'cha1','value'=>$chykRec['allergies'],'maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
			else
			{
				Form::OpenFormItem('Primary CHYK First Name*:', 260);
					echo( form_input(array('name'=>'chykFN1','id'=>'chykFN1','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('Primary CHYK Last Name*:', 260);
					echo( form_input(array('name'=>'chykLN1','id'=>'chykLN1','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				
				Form::OpenFormItem('CHYK Contact Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('chykG1', $genderOptions, '', 'id="chykG1" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 30);
				echo( form_checkbox(array('name'=>'chdietrest11','id'=>'chdietrest11','value'=>'chdietrest11','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Sugar</font>','chdietrest11',array('class'=>'chdietrest11','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'chdietrest12','id'=>'chdietrest12','value'=>'chdietrest12','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Fat</font>','chdietrest12',array('class'=>'chdietrest12','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'chdietrest13','id'=>'chdietrest13','value'=>'chdietrest13','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Gluten Free</font>','chdietrest13',array('class'=>'chdietrest13','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa1',array('class'=>'aa1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'cha1','id'=>'cha1','maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
		echo('</div>');

		echo('<div id="chyk2" style="display: none; ">');
			if ($numchyk > 1)
			{
				$chykRec = $chykInfoArr[1];
				Form::OpenFormItem('CHYK #2 First Name*:', 260);
					echo( form_input(array('name'=>'chykFN2','id'=>'chykFN2','value'=>$chykRec['firstname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('CHYK #2 Last Name*:', 260);
					echo( form_input(array('name'=>'chykLN2','id'=>'chykLN2','value'=>$chykRec['lastname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				
				Form::OpenFormItem('CHYK Contact Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('chykG2', $genderOptions, $chykRec['gender'], 'id="chykG2" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 30);
				$tmp = explode(",",$chykRec['dietrest'],3);
				if (in_array("Low Sugar",$tmp))
				{
					echo( form_checkbox(array('name'=>'chdietrest21','id'=>'chdietrest21','value'=>'chdietrest21','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','chdietrest21',array('class'=>'chdietrest21','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'chdietrest21','id'=>'chdietrest21','value'=>'chdietrest21','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','chdietrest21',array('class'=>'chdietrest21','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );				
				}
	
				if (in_array("Low Fat",$tmp))
				{
					echo( form_checkbox(array('name'=>'chdietrest22','id'=>'chdietrest22','value'=>'chdietrest22','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','chdietrest22',array('class'=>'chdietrest22','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'chdietrest22','id'=>'chdietrest22','value'=>'chdietrest22','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','chdietrest22',array('class'=>'chdietrest22','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
	
				if (in_array("Gluten Free",$tmp))
				{
					echo( form_checkbox(array('name'=>'chdietrest23','id'=>'chdietrest23','value'=>'chdietrest23','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','chdietrest23',array('class'=>'chdietrest23','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'chdietrest23','id'=>'chdietrest23','value'=>'chdietrest23','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','chdietrest23',array('class'=>'chdietrest23','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa1',array('class'=>'aa1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'cha2','id'=>'cha2','value'=>$chykRec['allergies'],'maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
			else
			{
				Form::OpenFormItem('CHYK #2 First Name*:', 260);
					echo( form_input(array('name'=>'chykFN2','id'=>'chykFN2','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('CHYK #2 Last Name*:', 260);
					echo( form_input(array('name'=>'chykLN2','id'=>'chykLN2','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('CHYK #2 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('chykG2', $genderOptions, '', 'id="chykG2" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 5);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 10);
				echo( form_checkbox(array('name'=>'chdietrest21','id'=>'chdietrest21','value'=>'chdietrest21','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Sugar</font>','chdietrest21',array('class'=>'chdietrest21','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'chdietrest22','id'=>'chdietrest22','value'=>'chdietrest22','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Fat</font>','chdietrest22',array('class'=>'chdietrest22','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'chdietrest23','id'=>'chdietrest23','value'=>'chdietrest23','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Gluten Free</font>','chdietrest23',array('class'=>'chdietrest23','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa2',array('class'=>'aa2','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'cha2','id'=>'cha2','maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
		echo('</div>');

		echo('<div id="chyk3" style="display: none; ">');
			if ($numchyk > 2)
			{
				$chykRec = $chykInfoArr[2];
				Form::OpenFormItem('CHYK #3 First Name*:', 260);
					echo( form_input(array('name'=>'chykFN3','id'=>'chykFN3','value'=>$chykRec['firstname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('CHYK #3 Last Name*:', 260);
					echo( form_input(array('name'=>'chykLN3','id'=>'chykLN3','value'=>$chykRec['lastname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				
				Form::OpenFormItem('CHYK Contact Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('chykG3', $genderOptions, $chykRec['gender'], 'id="chykG3" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 30);
				$tmp = explode(",",$chykRec['dietrest'],3);
				if (in_array("Low Sugar",$tmp))
				{
					echo( form_checkbox(array('name'=>'chdietrest31','id'=>'chdietrest31','value'=>'chdietrest31','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','chdietrest31',array('class'=>'chdietrest31','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'chdietrest31','id'=>'chdietrest31','value'=>'chdietrest31','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','chdietrest31',array('class'=>'chdietrest31','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );				
				}
	
				if (in_array("Low Fat",$tmp))
				{
					echo( form_checkbox(array('name'=>'chdietrest32','id'=>'chdietrest32','value'=>'chdietrest32','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','chdietrest32',array('class'=>'chdietrest32','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'chdietrest32','id'=>'chdietrest32','value'=>'chdietrest32','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','chdietrest32',array('class'=>'chdietrest32','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
	
				if (in_array("Gluten Free",$tmp))
				{
					echo( form_checkbox(array('name'=>'chdietrest33','id'=>'chdietrest33','value'=>'chdietrest33','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','chdietrest33',array('class'=>'chdietrest33','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'chdietrest33','id'=>'chdietrest33','value'=>'chdietrest33','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','chdietrest33',array('class'=>'chdietrest33','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa1',array('class'=>'aa1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'cha3','id'=>'cha3','value'=>$chykRec['allergies'],'maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
			else
			{
				Form::OpenFormItem('CHYK #3 First Name*:', 260);
					echo( form_input(array('name'=>'chykFN3','id'=>'chykFN3','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('CHYK #3 Last Name*:', 260);
					echo( form_input(array('name'=>'chykLN3','id'=>'chykLN3','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('CHYK #3 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('chykG3', $genderOptions, '', 'id="chykG3" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 5);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 10);
				echo( form_checkbox(array('name'=>'chdietrest31','id'=>'chdietrest31','value'=>'chdietrest31','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Sugar</font>','chdietrest31',array('class'=>'chdietrest31','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'chdietrest32','id'=>'chdietrest32','value'=>'chdietrest32','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Fat</font>','chdietrest32',array('class'=>'chdietrest32','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'chdietrest33','id'=>'chdietrest33','value'=>'chdietrest33','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Gluten Free</font>','chdietrest33',array('class'=>'chdietrest33','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa3',array('class'=>'aa3','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'cha3','id'=>'cha3','maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
		echo('</div>');

		echo('<div id="chyk4" style="display: none; ">');
			if ($numchyk > 3)
			{
				$chykRec = $chykInfoArr[3];
				Form::OpenFormItem('CHYK #4 First Name*:', 260);
					echo( form_input(array('name'=>'chykFN4','id'=>'chykFN4','value'=>$chykRec['firstname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('CHYK #4 Last Name*:', 260);
					echo( form_input(array('name'=>'chykLN4','id'=>'chykLN4','value'=>$chykRec['lastname'],'maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				
				Form::OpenFormItem('CHYK Contact Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('chykG4', $genderOptions, $chykRec['gender'], 'id="chykG4" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 30);
				$tmp = explode(",",$chykRec['dietrest'],3);
				if (in_array("Low Sugar",$tmp))
				{
					echo( form_checkbox(array('name'=>'chdietrest41','id'=>'chdietrest41','value'=>'chdietrest41','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','chdietrest41',array('class'=>'chdietrest41','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'chdietrest41','id'=>'chdietrest41','value'=>'chdietrest41','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Sugar</font>','chdietrest41',array('class'=>'chdietrest41','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );				
				}
	
				if (in_array("Low Fat",$tmp))
				{
					echo( form_checkbox(array('name'=>'chdietrest42','id'=>'chdietrest42','value'=>'chdietrest42','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','chdietrest42',array('class'=>'chdietrest42','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'chdietrest42','id'=>'chdietrest42','value'=>'chdietrest42','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Low Fat</font>','chdietrest42',array('class'=>'chdietrest42','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
	
				if (in_array("Gluten Free",$tmp))
				{
					echo( form_checkbox(array('name'=>'chdietrest43','id'=>'chdietrest43','value'=>'chdietrest43','checked'=>TRUE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','chdietrest43',array('class'=>'chdietrest43','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				else
				{
					echo( form_checkbox(array('name'=>'chdietrest43','id'=>'chdietrest43','value'=>'chdietrest43','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
					echo ( form_label('<font size="2" color="black">Gluten Free</font>','chdietrest43',array('class'=>'chdietrest43','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				}
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa1',array('class'=>'aa1','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'cha4','id'=>'cha4','value'=>$chykRec['allergies'],'maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
			else
			{
				Form::OpenFormItem('CHYK #4 First Name*:', 260);
					echo( form_input(array('name'=>'chykFN4','id'=>'chykFN4','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('CHYK #4 Last Name*:', 260);
					echo( form_input(array('name'=>'chykLN4','id'=>'chykLN4','maxlength'=>'16','style'=>'width: 250px;')) );
				Form::CloseFormItem();
				Form::OpenFormItem('CHYK #4 Gender*:', 260);
				$genderOptions = array(''=>'Select','male'=>'Male','female'=>'Female');
					echo( form_dropdown('chykG4', $genderOptions, '', 'id="chykG4" style="width: 75px;" ') );
				Form::CloseFormItem();
	
				Spacer::Render(0, 5);
				echo ( form_label('<b><u><font size="2" color="black">Dietary Restrictions:</u></b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 7px; width: 600px;')) );
				echo("</br>");
				Spacer::Render(0, 10);
				echo( form_checkbox(array('name'=>'chdietrest41','id'=>'chdietrest41','value'=>'chdietrest41','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Sugar</font>','chdietrest41',array('class'=>'chdietrest41','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'chdietrest42','id'=>'chdietrest42','value'=>'chdietrest42','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Low Fat</font>','chdietrest42',array('class'=>'chdietrest42','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo( form_checkbox(array('name'=>'chdietrest43','id'=>'chdietrest43','value'=>'chdietrest43','checked'=>FALSE,'style'=>'display: block; float: left; vertical-align: middle; margin: 0 0 0 7px; width: 40px;','onClick'=>'sponsorHandler();')) );			
				echo ( form_label('<font size="2" color="black">Gluten Free</font>','chdietrest43',array('class'=>'chdietrest43','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; white-space: nowrap; width: 100px;')) );
				echo('</br>');
				/*
				Spacer::Render(0, 10);
				echo ( form_label('<b><u><font size="2" color="black">Allergies*:</u></b></font><font size="1" color="red"> (must enter "None" for no allergies)</font>','aa4',array('class'=>'aa4','style'=>'clear: left; display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 7px; white-space: nowrap; width: 300px;')) );
				echo('</br>');
				Spacer::Render(0, 10);
				echo( form_textarea(array('name'=>'cha4','id'=>'cha4','maxlength'=>'128','rows'=>'3','cols'=>'80','style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: -4px 0 0 7px; width: 400px;')) );
				*/
				Spacer::Render(0, 30);
				echo('<hr style="width:50%; size:10; color:#0000FF;" align="left" />');
			}
		echo('</div>');
		echo('<hr />');
	echo('</div>');

		Spacer::Render(0, 30);
	
		//Residential or Day attendee
		echo ( form_label('</b><font size="2" color="red"><b>Residential or Day Attendee</b></font>','spons',array('class'=>'spons','style'=>'clear: left; float: left; text-align: left; margin: -10px 10px 0 0; width: 400px;')) );
		Spacer::Render(0, 8);
		echo('<hr />');
		//Capture residential preference
		echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">Do You Need Accommodation:</div><div class="form-item-value" style="width: 250px;">');
			$resoptions = array(''=>'Select','1'=>'Yes','0'=>'No');
			echo( form_dropdown('needaccommodation', $resoptions, $ms_registration_value->getNeedAccommodation(), 'id="needaccommodation" style="width: 70px;"  onchange="accommodationChangeHandler();"') );
		echo('</div><div class="clear"></div></div>');
		echo('<hr />');		
	
	Spacer::Render(0, 50);
	//Setup Bhiksha offerings
	$dayname = array('Mon, Jul 30<sup>th</sup>','Tue, Jul 31<sup>st</sup>','Wed, Aug 1<sup>st</sup>','Thu, Aug 2<sup>nd</sup>','Fri, Aug 3<sup>rd</sup>');
	$eventname = array('Morning','Lunch','Evening');
	echo ( form_label('</b><font size="2" color="red"><b>Sponsorship Opportunities ($251 per session)</b></font>','spons',array('class'=>'spons','style'=>'clear: left; float: left; text-align: left; margin: -10px 10px 0 0; width: 400px;')) );
	Spacer::Render(0, 8);
	echo('<hr />');
	echo ( form_label('<font size="2" color="black"><b><u>Bhiksha ($251 per session)</u></b></font></br><font size="1" color="red">(It is not necessary for the Bhiksha sponsors to cook the food. Our volunteers will cook the Bhiksha. Bhiksha sponsors are welcome to join and help our volunteers in Bhiksha preparation.)</font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 21px; width: 600px;')) );
	echo("</br>");
	
	Spacer::Render(0, 50);
	echo('<table border="1" style="clear: left; display: block; float: left; margin: 0 0 0 21px;">');

	$bidarr = array();
	for($i=0; $i<$numbiksha; $i++)
	{
		$bikshaInfoArr = $ms_registration_value->getBikshaInfo();
		$bikshaRec = $bikshaInfoArr[$i];
		$dayid = intval($bikshaRec["dayid"]);
		$sessid = intval($bikshaRec["eventid"]);
		$tag = strval($dayid).strval($sessid);
		array_push($bidarr, $tag);
	}

	$id = 0;
	$ie = 0;
	$tag = strval(($id+1).($ie+1));
	$ie1 = 1;
	$tag1 = strval(($id+1).($ie1+1));
	$ie2 = 2;
	$tag2 = strval(($id+1).($ie2+1));		
	if (in_array($tag1,$bidarr) or in_array($tag2,$bidarr))
	{
		if (in_array($tag1,$bidarr) and in_array($tag2,$bidarr))
			echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
		else
		{
			if (in_array($tag1,$bidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
			
			if (in_array($tag2,$bidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');
		}
	}
	else
		echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		

	$id = 1;
	$ie = 0;
	$tag = strval(($id+1).($ie+1));
	$ie1 = 1;
	$tag1 = strval(($id+1).($ie1+1));
	$ie2 = 2;
	$tag2 = strval(($id+1).($ie2+1));		
	if (in_array($tag1,$bidarr) or in_array($tag2,$bidarr))
	{
		if (in_array($tag1,$bidarr) and in_array($tag2,$bidarr))
			echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
		else
		{
			if (in_array($tag1,$bidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
			
			if (in_array($tag2,$bidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');
		}
	}
	else
		echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		

	$id = 2;
	$ie = 0;
	$tag = strval(($id+1).($ie+1));
	$ie1 = 1;
	$tag1 = strval(($id+1).($ie1+1));
	$ie2 = 2;
	$tag2 = strval(($id+1).($ie2+1));		
	if (in_array($tag1,$bidarr) or in_array($tag2,$bidarr))
	{
		if (in_array($tag1,$bidarr) and in_array($tag2,$bidarr))
			echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
		else
		{
			if (in_array($tag1,$bidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
			
			if (in_array($tag2,$bidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');
		}
	}
	else
		echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		

	$id = 3;
	$ie = 0;
	$tag = strval(($id+1).($ie+1));
	$ie1 = 1;
	$tag1 = strval(($id+1).($ie1+1));
	$ie2 = 2;
	$tag2 = strval(($id+1).($ie2+1));		
	if (in_array($tag1,$bidarr) or in_array($tag2,$bidarr))
	{
		if (in_array($tag1,$bidarr) and in_array($tag2,$bidarr))
			echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
		else
		{
			if (in_array($tag1,$bidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
			
			if (in_array($tag2,$bidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');
		}
	}
	else
		echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		

	$id = 4;
	$ie = 0;
	$tag = strval(($id+1).($ie+1));
	$ie1 = 1;
	$tag1 = strval(($id+1).($ie1+1));
	$ie2 = 2;
	$tag2 = strval(($id+1).($ie2+1));		
	if (in_array($tag1,$bidarr) or in_array($tag2,$bidarr))
	{
		if (in_array($tag1,$bidarr) and in_array($tag2,$bidarr))
			echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
		else
		{
			if (in_array($tag1,$bidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
			
			if (in_array($tag2,$bidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');
		}
	}
	else
		echo('<tr><td>'.form_checkbox(array('name'=>'boption'.$tag1,'id'=>'boption'.$tag1,'value'=>$tag1,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie1].'</font>',$tag1,array('class'=>$tag1,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'boption'.$tag2,'id'=>'boption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		

	echo('</table>');
	Spacer::Render(0, 175);
	
	//Setup Arathi offerings
	$eventname = array('Morning','Lunch','Evening');
	echo ( form_label('<font size="2" color="black"><b><u>Arathi ($116 per session)</b></u></font>','biksha',array('class'=>'arathi','style'=>'clear: left; float: left; text-align: left; margin: 0 0 0 21px; width: 450px;')) );
	echo("</br>");
	Spacer::Render(0, 10);

	echo('<table border="1" style="clear: left; display: block; float: left; margin: 0 0 0 21px;">');
	$aidarr = array();
	for($i=0; $i<$numarathi; $i++)
	{
		$arathiInfoArr = $ms_registration_value->getArathiInfo();
		$arathiRec = $arathiInfoArr[$i];
		$dayid = intval($arathiRec["dayid"]);
		$sessid = intval($arathiRec["eventid"]);
		$tag = strval($dayid).strval($sessid);
		array_push($aidarr, $tag);
	}

	$id = 0;
	$ie = 0;
	$tag = strval(($id+1).($ie+1));
	$ie1 = 1;
	$tag1 = strval(($id+1).($ie1+1));
	$ie2 = 2;
	$tag2 = strval(($id+1).($ie2+1));		
	if (in_array($tag,$aidarr) or in_array($tag2,$aidarr))
	{
		if (in_array($tag,$aidarr) and in_array($tag2,$aidarr))
			echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
		else
		{
			if (in_array($tag,$aidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
			
			if (in_array($tag2,$aidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');
		}
	}
	else
		echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		

	$id = 1;
	$ie = 0;
	$tag = strval(($id+1).($ie+1));
	$ie1 = 1;
	$tag1 = strval(($id+1).($ie1+1));
	$ie2 = 2;
	$tag2 = strval(($id+1).($ie2+1));		
	if (in_array($tag,$aidarr) or in_array($tag2,$aidarr))
	{
		if (in_array($tag,$aidarr) and in_array($tag2,$aidarr))
			echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
		else
		{
			if (in_array($tag,$aidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
			
			if (in_array($tag2,$aidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');
		}
	}
	else
		echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		

	$id = 2;
	$ie = 0;
	$tag = strval(($id+1).($ie+1));
	$ie1 = 1;
	$tag1 = strval(($id+1).($ie1+1));
	$ie2 = 2;
	$tag2 = strval(($id+1).($ie2+1));		
	if (in_array($tag,$aidarr) or in_array($tag2,$aidarr))
	{
		if (in_array($tag,$aidarr) and in_array($tag2,$aidarr))
			echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
		else
		{
			if (in_array($tag,$aidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
			
			if (in_array($tag2,$aidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');
		}
	}
	else
		echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		

	$id = 3;
	$ie = 0;
	$tag = strval(($id+1).($ie+1));
	$ie1 = 1;
	$tag1 = strval(($id+1).($ie1+1));
	$ie2 = 2;
	$tag2 = strval(($id+1).($ie2+1));		
	if (in_array($tag,$aidarr) or in_array($tag2,$aidarr))
	{
		if (in_array($tag,$aidarr) and in_array($tag2,$aidarr))
			echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
		else
		{
			if (in_array($tag,$aidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
			
			if (in_array($tag2,$aidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');
		}
	}
	else
		echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		

	$id = 4;
	$ie = 0;
	$tag = strval(($id+1).($ie+1));
	$ie1 = 1;
	$tag1 = strval(($id+1).($ie1+1));
	$ie2 = 2;
	$tag2 = strval(($id+1).($ie2+1));		
	if (in_array($tag,$aidarr) or in_array($tag2,$aidarr))
	{
		if (in_array($tag,$aidarr) and in_array($tag2,$aidarr))
			echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
		else
		{
			if (in_array($tag,$aidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		
			
			if (in_array($tag2,$aidarr))
				echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');
		}
	}
	else
		echo('<tr><td>'.form_checkbox(array('name'=>'aoption'.$tag,'id'=>'aoption'.$tag,'value'=>$tag,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie].'</font>',$tag,array('class'=>$tag,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td><td>'.form_checkbox(array('name'=>'aoption'.$tag2,'id'=>'aoption'.$tag2,'value'=>$tag2,'checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 4px 0 0 0; width: 40px;','onClick'=>'sponsorHandler();')).' '.form_label('<font size="2" color="black">'.$dayname[$id].' - '.$eventname[$ie2].'</font>',$tag2,array('class'=>$tag2,'style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: 0 0 0 -7px; white-space: nowrap; width: 180px;')).'</td></tr>');		

	echo('</table>');
	Spacer::Render(0, 150);

	echo('<hr />');

	Spacer::Render(0, 20);

	echo ( form_label('<b><font size="2" color="red">Primary Registrant Profile</b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 10px 0 0; width: 600px;')) );
	Spacer::Render(0, 20);
	echo('<hr />');

	//Capture registrant profile
	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">Email*:</div><div class="form-item-value" style="width: 250px;">');
		echo( form_input(array('name'=>'email','id'=>'email','value'=>$ms_registration_value->getEmail(),'maxlength'=>'127','style'=>'width: 250px;')) );
	echo('</div><div class="clear"></div></div>');
	
	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">Re-enter Email*:</div><div class="form-item-value" style="width: 250px;">');
		echo( form_input(array('name'=>'emailConfirm','id'=>'emailConfirm','value'=>$ms_registration_value->getEmail(),'maxlength'=>'127','style'=>'width: 250px;')) );
	echo('</div><div class="clear"></div></div>');
	
	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">Phone#*: <font size="2" color="red">(countrycode-xxx-xxx-xxxx)</font></div><div class="form-item-value" style="width: 250px;">');
	//Form::OpenFormItem('Phone#*: </br><font size="2" color="red">(xxx-xxx-xxxx)</font>', 260);
		echo( form_input(array('name'=>'phoneNumber','id'=>'phoneNumber','value'=>$ms_registration_value->getPhone(),'maxlength'=>'16','style'=>'width: 250px;')) );
	echo('</div><div class="clear"></div></div>');

	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">Address Line1*:</div><div class="form-item-value" style="width: 250px;">');
	//Form::OpenFormItem('Address*:', 260);
		echo( form_input(array('name'=>'address','id'=>'address','value'=>$ms_registration_value->getAddress(),'maxlength'=>'127','style'=>'width: 250px;')) );
	echo('</div><div class="clear"></div></div>');
	
	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">Address Line2:</div><div class="form-item-value" style="width: 250px;">');
	//Form::OpenFormItem('Address*:', 260);
		echo( form_input(array('name'=>'address1','id'=>'address1','value'=>$ms_registration_value->getAddress1(),'maxlength'=>'127','style'=>'width: 250px;')) );
	echo('</div><div class="clear"></div></div>');
	
	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">City*:</div><div class="form-item-value" style="width: 250px;">');
	//Form::OpenFormItem('City*:', 260);
		echo( form_input(array('name'=>'city','id'=>'city','value'=>$ms_registration_value->getCity(),'maxlength'=>'31','style'=>'width: 250px;')) );
	echo('</div><div class="clear"></div></div>');
	
	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">Country*:</div><div class="form-item-value" style="width: 250px;">');
	//Form::OpenFormItem('Country*:', 260);
		$countryOptions = $country_list;
		echo( form_dropdown('country', $countryOptions, $ms_registration_value->getCountry(),'id="country" style="width: 280px;" onchange="countryHandler();"') );
	echo('</div><div class="clear"></div></div>');

	echo('<div id="stateUSA" style="display: none; ">');
	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">State*:</div><div class="form-item-value" style="width: 250px;">');
	//Form::OpenFormItem('State*:', 260);
		$stateOptions = array(''=>'Select','AL'=>'Alabama','AK'=>'Alaska','AZ'=>'Arizona','AR'=>'Arkansas','CA'=>'California','CO'=>'Colorado','CT'=>'Connecticut','DE'=>'Delaware','DC'=>'District of Columbia','FL'=>'Florida','GA'=>'Georgia','HI'=>'Hawaii','ID'=>'Idaho','IL'=>'Illinois','IN'=>'Indiana','IA'=>'Iowa','KS'=>'Kansas','KY'=>'Kentucky','LA'=>'Louisiana','ME'=>'Maine','MD'=>'Maryland','MA'=>'Massachusetts','MI'=>'Michigan','MN'=>'Minnesota','MS'=>'Mississippi','MO'=>'Missouri','MT'=>'Montana','NE'=>'Nebraska','NV'=>'Nevada','NH'=>'New Hampshire','NJ'=>'New Jersey','NM'=>'New Mexico','NY'=>'New York','NC'=>'North Carolina','ND'=>'North Dakota','OH'=>'Ohio','OK'=>'Oklahoma','OR'=>'Oregon','PA'=>'Pennsylvania','RI'=>'Rhode Island','SC'=>'South Carolina','SD'=>'South Dakota','TN'=>'Tennessee','TX'=>'Texas','UT'=>'Utah','VT'=>'Vermont','VA'=>'Virginia','WA'=>'Washington','WV'=>'West Virginia','WI'=>'Wisconsin','WY'=>'Wyoming');
		echo( form_dropdown('stateusa', $stateOptions, $ms_registration_value->getState(), 'id="stateusa" style="width: 150px;" ') );
	echo('</div><div class="clear"></div></div>');
	echo('</div>');
	
	echo('<div id="stateGlobal" style="display: none; ">');
	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">State/Province*:</div><div class="form-item-value" style="width: 250px;">');
	//Form::OpenFormItem('State/Province*:', 260);
		echo( form_input(array('name'=>'stateglobal','id'=>'stateglobal','value'=>$ms_registration_value->getState(),'maxlength'=>'63','style'=>'width: 250px;')) );
	echo('</div><div class="clear"></div></div>');
	echo('</div>');

	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">Postal Code:</div><div class="form-item-value" style="width: 250px;">');
	//Form::OpenFormItem('Postal Code:', 260);
		echo( form_input(array('name'=>'zip','id'=>'zip','value'=>$ms_registration_value->getZip(),'maxlength'=>'10','style'=>'width: 100px;')) );
	echo('</div><div class="clear"></div></div>');

	//Capture any special needs
	//--------------------
	Spacer::Render(0, 15);
	echo ( form_label('<b><u><font size="2" color="black">Special Needs</b></font></u>','sn',array('class'=>'sn','style'=>'clear: left; float: left; text-align: left; margin: 0 10px 0 21px; width: 450px;')) );
	Spacer::Render(0, 15);
	echo("</br>");
	if ($ms_registration_value->getSpecialNeedsWheelchair() == 1)
	{
		echo( form_checkbox(array('name'=>'snwc','id'=>'snwc','value'=>'snwc','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 21px; width: 40px;','onClick'=>'sponsorHandler();')) );			
		echo ( form_label('<font size="2" color="black">Wheelchair Access</font>',$tag,array('class'=>'snwc','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; width: 300px;')) );
	}
	else
	{
		echo( form_checkbox(array('name'=>'snwc','id'=>'snwc','value'=>'snwc','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 21px; width: 40px;','onClick'=>'sponsorHandler();')) );			
		echo ( form_label('<font size="2" color="black">Wheelchair Access</font>',$tag,array('class'=>'snwc','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; width: 300px;')) );		
	}
	echo("</br>");
	
	if ($ms_registration_value->getSpecialNeedsRoom() == 1)
	{
		echo( form_checkbox(array('name'=>'snrm','id'=>'snrm','value'=>'snrm','checked'=>TRUE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 21px; width: 40px;','onClick'=>'sponsorHandler();')) );			
		echo ( form_label('<font size="2" color="black">Handicapped Access Room</font>',$tag,array('class'=>'snrm','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; width: 300px;')) );
	}
	else
	{
		echo( form_checkbox(array('name'=>'snrm','id'=>'snrm','value'=>'snrm','checked'=>FALSE,'style'=>'clear: left; display: block; float: left; vertical-align: middle; margin: 0 0 0 21px; width: 40px;','onClick'=>'sponsorHandler();')) );			
		echo ( form_label('<font size="2" color="black">Handicapped Access Room</font>',$tag,array('class'=>'snrm','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 -7px; width: 300px;')) );		
	}
	echo("</br>");

	Spacer::Render(0, 20);
	echo ( form_label('<font size="2" color="black"><b><u>Questions, Comments and any Special Requests:</u></b></font>',$tag,array('class'=>'sncomments','style'=>'display: block; float: left; vertical-align: middle; padding: 0 0 7px 0; margin: -4px 0 0 21px; width: 400px;')) );
	Spacer::Render(0, 25);
	echo( form_textarea(array('name'=>'sncomments','id'=>'sncomments','value'=>$ms_registration_value->getSpecialRequests(),'maxlength'=>'128','rows'=>'5','cols'=>'80','style'=>'margin: 0 0 0 3px; margin: 0 0 0 21px; width: 400px;')) );
	//--------------------
	
	echo('<hr />');
	Spacer::Render(0, 20);

	//Payment related
	//--------------------
	echo ( form_label('<b><font size="2" color="red">Payment Related</b></font>','biksha',array('class'=>'biksha','style'=>'clear: left; float: left; text-align: left; margin: 0 10px 0 0; width: 600px;')) );
	Spacer::Render(0, 20);
	echo('<hr />');

	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">Amount Paid:</div><div class="form-item-value" style="width: 250px;">');
		echo( form_input(array('name'=>'amountpaid','id'=>'amountpaid','value'=>$ms_registration_value->getAmountPaid(),'maxlength'=>'16','style'=>'width: 75px;')) );
	echo('</div><div class="clear"></div></div>');
	
	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">General Donation:</br><font size="1"; color="red">(Used to enter offline donations)</font></div><div class="form-item-value" style="width: 250px;">');
		echo( form_input(array('name'=>'donationamount','id'=>'donationamount','value'=>$ms_registration_value->getDonation(),'maxlength'=>'16','style'=>'width: 75px;','onChange'=>'sponsorHandler();')) );
	echo('</div><div class="clear"></div></div>');
	
	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">General Discount:</br><font size="1"; color="red">(Used to enter one-off discounts)</font></div><div class="form-item-value" style="width: 250px;">');
		echo( form_input(array('name'=>'discountamount','id'=>'discountamount','value'=>$ms_registration_value->getGeneralDiscount(),'maxlength'=>'16','style'=>'width: 75px;','onChange'=>'sponsorHandler();')) );
	echo('</div><div class="clear"></div></div>');
	
	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">Paypal TXN ID:</div><div class="form-item-value" style="width: 250px;">');
		echo( form_input(array('name'=>'pptxnid','id'=>'pptxnid','value'=>$ms_registration_value->getPaymentTransactionID(),'maxlength'=>'64','style'=>'width: 200px;')) );
	echo('</div><div class="clear"></div></div>');

	echo('<div class="form-item"><div class="form-item-key" style="margin: 0 10px 0 21px; width: 260px;">Check #:</div><div class="form-item-value" style="width: 250px;">');
		echo( form_input(array('name'=>'checknum','id'=>'checknum','value'=>$ms_registration_value->getCheckNum(),'maxlength'=>'16','style'=>'width: 75px;')) );
	echo('</div><div class="clear"></div></div>');
	
	echo('<hr />');
	Spacer::Render(0, 20);
	//--------------------

	echo ( form_label('<font size="2" color="red"><b>Computed Charges</b></font>',$tag,array('class'=>'charges','style'=>'display: block; float: left; vertical-align: middle; width: 400px;')) );
	Spacer::Render(0, 20);
	echo('<hr />');

	echo('<div class="form-total-summary">');
	echo('<div class="form-total-key-summary">Registration Total: </div>');
	echo('<div class="form-total-value-summary">$<span id="regtot"> </span></div>');
	echo('</div>');

	echo('<div class="form-total-summary">');
	echo('<div class="form-total-key-summary">Sponsorship Total: </div>');
	echo('<div class="form-total-value-summary">$<span id="spontot"> </span></div>');
	echo('</div>');

	echo('<div class="form-total-summary">');
	echo('<div class="form-total-key-summary">Donation Total: </div>');
	echo('<div class="form-total-value-summary">$<span id="dontot"> </span></div>');
	echo('</div>');

	echo('<div class="form-total-summary">');
	echo('<div class="form-total-key-summary">Teacher Discount: </div>');
	echo('<div class="form-total-value-summary"><span id="teacherdisc"> </span></div>');
	echo('</div>');

	echo('<div class="form-total-summary">');
	echo('<div class="form-total-key-summary">General Discount: </div>');
	echo('<div class="form-total-value-summary"><span id="gendisc"> </span></div>');
	echo('</div>');

	echo('<div class="form-total-summary">');
	echo('<div class="form-total-key-summary"><b>Amount Committed: </b></div>');
	echo('<div class="form-total-value-summary"><b>$<span id="totamount"></span></b></div>');
	echo('</div>');
	echo('<hr />');
	
	echo('</br>');
	echo('<font size="2" color="red">You must click the <u><b>Submit</b></u> button for any changes to be effective.</font>');

	//Handle case for country when using back/forward button on browser
	echo "<script type='text/javascript'>\n";
	echo "var country = $('country').options[$('country').selectedIndex].value;\n";	
	echo "if (country != 'NON') {\n";
	echo "if (country == 'US') {\n";
	echo "$('stateUSA').show();\n";
	echo "$('stateGlobal').hide(); } else {\n";
	echo "$('stateUSA').hide();\n";
	echo "$('stateGlobal').show(); } }\n";
	echo "</script>\n";		

	//Handle case for number of individuals when using back/forward button on browser
	echo "<script type='text/javascript'>\n";
	echo "var indCount = $('numind').options[$('numind').selectedIndex].value\n";	
	echo "if (indCount == '') {\n";
	echo "indCount = 0; }\n";
	echo "for( var i = 1; i <= 2; i++ ) {\n";
	echo "if( i <= indCount ) {\n";
	echo "$('ind' + i).show(); }\n";
	echo "else {\n";
	echo "$('ind' + i).hide(); }\n";
	echo "}\n";
	echo "</script>";		

	//Handle case for number of adults when using back/forward button on browser
	echo "<script type='text/javascript'>\n";
	echo "var adultCount = $('numadult').options[$('numadult').selectedIndex].value\n";	
	echo "if (adultCount == '') {\n";
	echo "adultCount = 0; }\n";
	echo "for( var i = 1; i <= 3; i++ ) {\n";
	echo "if( i <= adultCount ) {\n";
	echo "$('adult' + i).show(); }\n";
	echo "else {\n";
	echo "$('adult' + i).hide(); }\n";
	echo "}\n";
	echo "</script>";		

	//Handle case for number of children when using back/forward button on browser
	echo "<script type='text/javascript'>\n";
	echo "var childCount = $('numchild').options[$('numchild').selectedIndex].value\n";	
	echo "if (childCount == '') {\n";
	echo "childCount = 0; }\n";
	echo "for( var i = 1; i <= 3; i++ ) {\n";
	echo "if( i <= childCount ) {\n";
	echo "$('child' + i).show(); }\n";
	echo "else {\n";
	echo "$('child' + i).hide(); }\n";
	echo "}\n";
	echo "</script>";		

	//Handle case for chykref when using back/forward button on browser
	echo "<script type='text/javascript'>\n";
	echo "var chykref = $('chykref').options[$('chykref').selectedIndex].value\n";		
	echo "if (chykref == 'yes')\n";
	echo "{\n";
	echo "$('chykreferrer').show();\n";
	echo "}\n";
	echo "else\n";
	echo "{\n";
	echo "$('chykreferrer').hide();\n";
	echo "}\n";
	echo "</script>";	

	//Handle case for numchyk when using back/forward button on browser
	echo "<script type='text/javascript'>\n";
	echo "var chykCount = $('numchyk').options[$('numchyk').selectedIndex].value\n";	
	echo "if (chykCount == '') {\n";
	echo "chykCount = 0; }\n";
	echo "for( var i = 1; i <= 3; i++ ) {\n";
	echo "if( i <= chykCount ) {\n";
	echo "$('chyk' + i).show(); }\n";
	echo "else {\n";
	echo "$('chyk' + i).hide(); }\n";
	echo "}\n";
	echo "</script>";		

	//Handle case for regtype when using back/forward button on browser
	echo "<script type='text/javascript'>\n";
	echo "var regtype = parseInt($('regtype').options[$('regtype').selectedIndex].value);\n";
	echo "switch(regtype) {";
	echo "case 1: ";
	echo "$('regtype1').show();";
	echo "$('regtype2').hide();";
	echo "$('regtype3').hide();";
	echo "break;";
	echo "case 2: ";
	echo "$('regtype1').hide();";
	echo "$('regtype2').show();";
	echo "$('regtype3').hide();";
	echo "break;";
	echo "case 3: ";
	echo "$('regtype1').hide();";
	echo "$('regtype2').hide();";
	echo "$('regtype3').show();";
	echo "break;";
	echo "default: ";
	echo "$('regtype1').hide();";
	echo "$('regtype2').hide();";
	echo "$('regtype3').hide();";
	echo "}\n";
	echo "</script>";		
	

	echo( form_close() );
?>

<script type="text/javascript">	
	var regstate = 0;
	var regvalue = 0;
	var isteacher = 0;
	var regtype = parseInt($('regtype').options[$('regtype').selectedIndex].value);
	var needaccommodation = 1;
	if ($('needaccommodation') != null)
	{
		needaccommodation = parseInt($('needaccommodation').options[$('needaccommodation').selectedIndex].value);
		if (isNaN(needaccommodation)) needaccommodation = 1;
	}
	//var sponsoramount = parseInt($('sponsoramount').value);
	//if (isNaN(sponsoramount)) sponsoramount = 0;
	sponsoramount = 0;
	var divreg = document.getElementById('regtot');
	var divspon = document.getElementById('spontot');
	var divtot = document.getElementById('totamount');
	var divdon = document.getElementById('dontot');
	var divdisc = document.getElementById('teacherdisc');
	var divgendisc = document.getElementById('gendisc');
	var donationamount = parseInt(document.getElementById('donationamount').value);
	if (isNaN(donationamount)) donationamount = 0;
	var discountamount = parseInt(document.getElementById('discountamount').value);
	if (isNaN(discountamount)) discountamount = 0;
	var oRadioInd = document.forms[0].elements['regcaseind'];
	var oRadioFam = document.forms[0].elements['regcasefam'];
	var oRadioChy = document.forms[0].elements['regcasechyk'];
	var chykCount = $('numchyk').options[$('numchyk').selectedIndex].value;
	var indCount = $('numind').options[$('numind').selectedIndex].value;
	var id, ie;
	var tag;
	var checkBox;
	var now = new Date();
	var criticaldate = new Date("April 30, 2012 23:59:59");
	var accommodation_fee = "<?php echo $accommodation_fee ?>";

	if(chykCount == "")
		chykCount = 0;
	else
	{
		chykCount = parseInt(chykCount);
	}
	
	if(indCount == "")
		indCount = 0;
	else
	{
		indCount = parseInt(indCount);
	}

	switch(regtype)
	{
		case 1:
			isteacher = parseInt($('isteacherind').options[$('isteacherind').selectedIndex].value);
			for(i = 0; i < oRadioInd.length; i++)
			{
				if (oRadioInd[i].checked == true)
				{
					regstate = parseInt(oRadioInd[i].value);
				}
			}
			break;

		case 2:
			isteacher = parseInt($('isteacherfam').options[$('isteacherfam').selectedIndex].value);
			for(i = 0; i < oRadioFam.length; i++)
			{
				if (oRadioFam[i].checked == true)
				{
					regstate = parseInt(oRadioFam[i].value);
				}
			}
			break;

		case 3:
			isteacher = 0;
			for(i = 0; i < oRadioChy.length; i++)
			{
				if (oRadioChy[i].checked == true)
				{
					regstate = parseInt(oRadioChy[i].value);
				}
			}
			break;
	}
	
	switch(regstate)
	{
		//Double occupancy
		case 1:
			if (regtype != 3)
			{

				if (regtype == 2)
				{
					//Family
					if (now <= criticaldate) 
						regvalue = 1300;
					else 
						regvalue = 1450;
					if (needaccommodation == 0)
						regvalue = regvalue - accommodation_fee;
				}
				else
				{
					//Individual
					if (indCount == 2)
					{
						if (now <= criticaldate) 
							regvalue = 1300;
						else 
							regvalue = 1450;
					}
					else
					{
						if (indCount == 1)
						{
							if (now <= criticaldate) 
								regvalue = 650;
							else 
								regvalue = 725;
							}
						else
						{
							regvalue = 0;
						}						
					}					
					
					if (needaccommodation == 0)
						regvalue = regvalue - accommodation_fee;
				}
			}
			else
			{
				switch (chykCount)
				{
					case 1:	
						if (now <= criticaldate) 
							regvalue = 585;
						else 
							regvalue = 652;
						break;
					case 2:	
						if (now <= criticaldate) 
							regvalue = 1170;
						else 
							regvalue = 1305;
						break;
					default:
						regvalue = 0;
						break;
				}
				if (needaccommodation == 0)
					regvalue = regvalue - accommodation_fee;
			}
			break;
		//Triple occupancy
		case 2:
			if (regtype != 3)
			{
				if (now <= criticaldate)
					regvalue = 1600;
				else
					regvalue = 1750;
				if (needaccommodation == 0)
					regvalue = regvalue - accommodation_fee;
				break;
			}
			else
			{
				switch (chykCount)
				{
					case 1:	
						if (now <= criticaldate) 
							regvalue = 480;
						else 
							regvalue = 525;
						break;
					case 2:	
						if (now <= criticaldate) 
							regvalue = 960;
						else 
							regvalue = 1050;
						break;
					case 3:	
						if (now <= criticaldate) 
							regvalue = 1440;
						else 
							regvalue = 1575;
						break;
					default:
						regvalue = 0;
						break;
				}					
				if (needaccommodation == 0)
					regvalue = regvalue - accommodation_fee;
			}
			break;
		//Quad occupancy
		case 3:
			if (regtype != 3)
			{
				if (now <= criticaldate) 
					regvalue = 1750;
				else 
					regvalue = 1900;
				if (needaccommodation == 0)
					regvalue = regvalue - accommodation_fee;
			}
			else
			{
				switch (chykCount)
				{
					case 1:	
						if (now <= criticaldate) 
							regvalue = 394;
						else 
							regvalue = 427;
						break;
					case 2:	
						if (now <= criticaldate) 
							regvalue = 788;
						else 
							regvalue = 854;
						break;
					case 3:	
						if (now <= criticaldate) 
							regvalue = 1182;
						else 
							regvalue = 1281;
						break;
					case 4:	
						if (now <= criticaldate) 
							regvalue = 1575;
						else 
							regvalue = 1710;
						break;
					default:
						regvalue = 0;
						break;
				}					
				if (needaccommodation == 0)
					regvalue = regvalue - accommodation_fee;
			}
			break;
		//Single occupancy
		case 4:
			if (now <= criticaldate)
				regvalue = 1100;
			else
				regvalue = 1200;
			if (needaccommodation == 0)
				regvalue = regvalue - accommodation_fee;
			break;
		default:
			regvalue = 0;
	}

	for(id=1; id<=5; id++)
	{
		for(ie=2; ie<=3; ie++)
		{
			tag = String(id)+String(ie);
			checkBox = document.forms[0].elements['boption'+tag];
			if (checkBox.checked == true)
			{
				sponsoramount += 251;
			}
		}
	}

	for(id=1; id<=5; id++)
	{
		for(ie=1; ie<=3; ie++)
		{
			if (ie != 2)
			{
				tag = String(id) + String(ie);
				checkBox = document.forms[0].elements['aoption'+tag];
				if (checkBox.checked == true) {
					sponsoramount += 116;
				}
			}
		}
	}

	if (isteacher == 1) {
		tot_with_discount = regvalue + sponsoramount + donationamount - 100;
		divdisc.innerHTML = '<font color="red">$(100)<font>';
	}
	else {
		tot_with_discount = regvalue + sponsoramount + donationamount;
		divdisc.innerHTML = '$0';
	}
	
	if (discountamount > 0.01) {
		tot_with_discount = tot_with_discount - discountamount;
		divgendisc.innerHTML = '<font color="red">$('+discountamount+')<font>';
	}
	else {
		divgendisc.innerHTML = '$0';
	}

	if (tot_with_discount > 0.01)
		divtot.innerHTML = tot_with_discount;
	else
		divtot.innerHTML = 0;
	
	divreg.innerHTML = regvalue;
	divdon.innerHTML = donationamount;
	divspon.innerHTML = sponsoramount;
</script>
	
	<div class="form-button-container">
		<a href="javascript: validate();"><img src="<?php echo( base_url() );?>assets/images/buttons/submit_off1.gif" border="0" onmouseover="this.src = '<?php echo( base_url() );?>assets/images/buttons/submit_over1.gif';" onmousedown="this.src = '<?php echo( base_url() );?>assets/images/buttons/submit_on1.gif';" onmouseup="this.src = '<?php echo( base_url() );?>assets/images/buttons/submit_off1.gif';" onmouseout="this.src = '<?php echo( base_url() );?>assets/images/buttons/submit_off1.gif';" /></a>
	</div>
</div>

<script type="text/javascript">
	function validate()
	{
		var eventid =  "<?php echo $eventid ?>";
		new Ajax.Request(baseUrl + 'validation/mahasamadhi_validation/validate_admin_edit_reg/'+eventid, 
		{
			method:'post',
			parameters: Form.serialize( $('adminEditMahasamadhiRegForm') ),
		  	onSuccess: function(response)
			{
				var result = response.responseText;
				
				if( result == 'VALIDATION_SUCCESS' )
				{
					$('adminEditMahasamadhiRegForm').submit();
				}
				else
				{
					$('validationErrors').innerHTML = result;
					$('validationErrors').show();
					Effect.ScrollTo('validationErrors', { duration:'0.2', offset:-20 });
				}
			},
			onFailure: function(response){var result = response.responseText; $('validationErrors').innerHTML = result;
					$('validationErrors').show();alert('failed') }
		});
	}

	function numAdultChangeHandler()
	{
		var adultCount = $('numadult').options[$('numadult').selectedIndex].value;
		
		if(adultCount == "")
		{
			adultCount = 0;
		}
		
		for( var i = 1; i <= 3; i++ )
		{
			if( i <= adultCount )
			{
				$('adult' + i).show();
			}
			else
			{
				$('adult' + i).hide();
			}
		}
	}

	function numIndChangeHandler()
	{
		var indCount = $('numind').options[$('numind').selectedIndex].value;
		
		if(indCount == "")
		{
			indCount = 0;
		}
		
		for( var i = 1; i <= 2; i++ )
		{
			if( i <= indCount )
			{
				$('ind' + i).show();
			}
			else
			{
				$('ind' + i).hide();
			}
		}

		registrationHandler();
	}

	function numChildChangeHandler()
	{
		var childCount = $('numchild').options[$('numchild').selectedIndex].value;
		
		if(childCount == "")
		{
			childCount = 0;
		}
		
		for( var i = 1; i <= 3; i++ )
		{
			if( i <= childCount )
			{
				$('child' + i).show();
			}
			else
			{
				$('child' + i).hide();
			}
		}
	}

	function numCHYKChangeHandler()
	{
		var chykCount = $('numchyk').options[$('numchyk').selectedIndex].value;
		
		if(chykCount == "")
		{
			chykCount = 0;
		}
		
		for( var i = 1; i <= 4; i++ )
		{
			if( i <= chykCount )
			{
				$('chyk' + i).show();
			}
			else
			{
				$('chyk' + i).hide();
			}
		}

		registrationHandler();
	}

	function chykRefChangeHandler()
	{
		var chykref = $('chykref').options[$('chykref').selectedIndex].value;
		
		if (chykref == "yes")
		{
			$('chykreferrer').show();
		}
		else
		{
			$('chykreferrer').hide();
		}
	}

	function accommodationChangeHandler()
	{
		registrationHandler();
	}
	
	function regTypeChangeHandler()
	{
		var regtype = parseInt($('regtype').options[$('regtype').selectedIndex].value);
		
		switch(regtype)
		{
			case 1:
				$('regtype1').show();
				$('regtype2').hide();
				$('regtype3').hide();
			break;
			
			case 2:
				$('regtype2').show();
				$('regtype1').hide();
				$('regtype3').hide();
			break;
			
			case 3:
				$('regtype3').show();
				$('regtype1').hide();
				$('regtype2').hide();
			break;
			
			default:
				$('regtype1').hide();
				$('regtype2').hide();
				$('regtype3').hide();				
		}
		
		registrationHandler();
	}

	function registrationHandler()
	{
		var regstate = 0;
		var regvalue = 0;
		var isteacher = 0;
		var regtype = parseInt($('regtype').options[$('regtype').selectedIndex].value);
		var needaccommodation = 1;
		if ($('needaccommodation') != null)
		{
			needaccommodation = parseInt($('needaccommodation').options[$('needaccommodation').selectedIndex].value);
			if (isNaN(needaccommodation)) needaccommodation = 1;
		}
		//var sponsoramount = parseInt($('sponsoramount').value);
		//if (isNaN(sponsoramount)) sponsoramount = 0;
		sponsoramount = 0;
		var divreg = document.getElementById('regtot');
		var divspon = document.getElementById('spontot');
		var divtot = document.getElementById('totamount');
		var divdon = document.getElementById('dontot');
		var divdisc = document.getElementById('teacherdisc');
		var divgendisc = document.getElementById('gendisc');
		var donationamount = parseInt(document.getElementById('donationamount').value);
		if (isNaN(donationamount)) donationamount = 0;
		var discountamount = parseInt(document.getElementById('discountamount').value);
		if (isNaN(discountamount)) discountamount = 0;	
		var oRadioInd = document.forms[0].elements['regcaseind'];
		var oRadioFam = document.forms[0].elements['regcasefam'];
		var oRadioChy = document.forms[0].elements['regcasechyk'];
		var chykCount = $('numchyk').options[$('numchyk').selectedIndex].value;
		var indCount = $('numind').options[$('numind').selectedIndex].value;
		var id, ie;
		var tag;
		var checkBox;
		var now = new Date();
		var criticaldate = new Date("April 30, 2012 23:59:59");
		var accommodation_fee = "<?php echo $accommodation_fee ?>";
		
		if(chykCount == "")
			chykCount = 0;
		else
		{
			chykCount = parseInt(chykCount);
		}

		if(indCount == "")
			indCount = 0;
		else
		{
			indCount = parseInt(indCount);
		}

		switch(regtype)
		{
			case 1:
			isteacher = parseInt($('isteacherind').options[$('isteacherind').selectedIndex].value);
			for(i = 0; i < oRadioInd.length; i++)
			{
				if (oRadioInd[i].checked == true)
				{
					regstate = parseInt(oRadioInd[i].value);
				}
			}
			break;
	
			case 2:
			isteacher = parseInt($('isteacherfam').options[$('isteacherfam').selectedIndex].value);
			for(i = 0; i < oRadioFam.length; i++)
			{
				if (oRadioFam[i].checked == true)
				{
					regstate = parseInt(oRadioFam[i].value);
				}
			}
			break;
	
			case 3:
			isteacher = 0;
			for(i = 0; i < oRadioChy.length; i++)
			{
				if (oRadioChy[i].checked == true)
				{
					regstate = parseInt(oRadioChy[i].value);
				}
			}
			break;
		}
		
		switch(regstate)
		{
			//Double occupancy
			case 1:
				if (regtype != 3)
				{
					if (regtype == 2)
					{
						//Family
						if (now <= criticaldate) 
							regvalue = 1300;
						else 
							regvalue = 1450;
						if (needaccommodation == 0)
							regvalue = regvalue - accommodation_fee;
					}
					else
					{
						//Individual
						if (indCount == 2)
						{
							if (now <= criticaldate) 
								regvalue = 1300;
							else 
								regvalue = 1450;
						}
						else
						{
							if (indCount == 1)
							{
								if (now <= criticaldate) 
									regvalue = 650;
								else 
									regvalue = 725;
								}
							else
							{
								regvalue = 0;
							}						
						}					
						
						if (needaccommodation == 0)
							regvalue = regvalue - accommodation_fee;
					}
				}
				else
				{
					switch (chykCount)
					{
						case 1:	
							if (now <= criticaldate) 
								regvalue = 585;
							else 
								regvalue = 652;
							break;
						case 2:	
							if (now <= criticaldate) 
								regvalue = 1170;
							else 
								regvalue = 1305;
							break;
						default:
							regvalue = 0;
							break;
					}					
					if (needaccommodation == 0)
						regvalue = regvalue - accommodation_fee;
				}
				break;
			//Triple occupancy
			case 2:
				if (regtype != 3)
				{
					if (now <= criticaldate)
						regvalue = 1600;
					else
						regvalue = 1750;
					if (needaccommodation == 0)
						regvalue = regvalue - accommodation_fee;
					break;
				}
				else
				{
					switch (chykCount)
					{
						case 1:	
							if (now <= criticaldate) 
								regvalue = 480;
							else 
								regvalue = 525;
							break;
						case 2:	
							if (now <= criticaldate) 
								regvalue = 960;
							else 
								regvalue = 1050;
							break;
						case 3:	
							if (now <= criticaldate) 
								regvalue = 1440;
							else 
								regvalue = 1575;
							break;
						default:
							regvalue = 0;
							break;
					}					
					if (needaccommodation == 0)
						regvalue = regvalue - accommodation_fee;
				}
				break;
			//Quad occupancy
			case 3:
				if (regtype != 3)
				{
					if (now <= criticaldate) 
						regvalue = 1750;
					else 
						regvalue = 1900;
					if (needaccommodation == 0)
						regvalue = regvalue - accommodation_fee;
				}
				else
				{
					switch (chykCount)
					{
						case 1:	
							if (now <= criticaldate) 
								regvalue = 394;
							else 
								regvalue = 427;
							break;
						case 2:	
							if (now <= criticaldate) 
								regvalue = 788;
							else 
								regvalue = 854;
							break;
						case 3:	
							if (now <= criticaldate) 
								regvalue = 1182;
							else 
								regvalue = 1281;
							break;
						case 4:	
							if (now <= criticaldate) 
								regvalue = 1575;
							else 
								regvalue = 1710;
							break;
						default:
							regvalue = 0;
							break;
					}					
					if (needaccommodation == 0)
						regvalue = regvalue - accommodation_fee;
				}
				break;
			//Single occupancy
			case 4:
				if (now <= criticaldate)
					regvalue = 1100;
				else
					regvalue = 1200;
				if (needaccommodation == 0)
					regvalue = regvalue - accommodation_fee;
				break;
			default:
				regvalue = 0;
		}

		for(id=1; id<=5; id++)
		{
			for(ie=2; ie<=3; ie++)
			{
				tag = String(id)+String(ie);
				checkBox = document.forms[0].elements['boption'+tag];
				if (checkBox.checked == true)
				{
					sponsoramount += 251;
				}
			}
		}

		for(id=1; id<=5; id++)
		{
			for(ie=1; ie<=3; ie++)
			{
				if (ie != 2)
				{
					tag = String(id) + String(ie);
					checkBox = document.forms[0].elements['aoption'+tag];
					if (checkBox.checked == true) {
						sponsoramount += 116;
					}
				}
			}
		}

		if (isteacher == 1) {
			tot_with_discount = regvalue + sponsoramount + donationamount - 100;
			divdisc.innerHTML = '<font color="red">$(100)<font>';
		}
		else {
			tot_with_discount = regvalue + sponsoramount + donationamount;
			divdisc.innerHTML = '$0';
		}
	
		if (discountamount > 0.01) {
			tot_with_discount = tot_with_discount - discountamount;
			divgendisc.innerHTML = '<font color="red">$('+discountamount+')<font>';
		}
		else {
			divgendisc.innerHTML = '$0';
		}
		
		if (tot_with_discount > 0.01)
			divtot.innerHTML = tot_with_discount;
		else
			divtot.innerHTML = 0;
	
		divreg.innerHTML = regvalue;
		divdon.innerHTML = donationamount;
		divspon.innerHTML = sponsoramount;
	}

	function sponsorHandler()
	{
		var regstate = 0;
		var regvalue = 0;
		var isteacher = 0;
		var regtype = parseInt($('regtype').options[$('regtype').selectedIndex].value);
		var needaccommodation = 1;
		if ($('needaccommodation') != null)
		{
			needaccommodation = parseInt($('needaccommodation').options[$('needaccommodation').selectedIndex].value);
			if (isNaN(needaccommodation)) needaccommodation = 1;
		}
		//var sponsoramount = parseInt($('sponsoramount').value);
		//if (isNaN(sponsoramount)) sponsoramount = 0;
		sponsoramount = 0;
		var divreg = document.getElementById('regtot');
		var divspon = document.getElementById('spontot');
		var divtot = document.getElementById('totamount');
		var divdon = document.getElementById('dontot');
		var divdisc = document.getElementById('teacherdisc');
		var divgendisc = document.getElementById('gendisc');
		var donationamount = parseInt(document.getElementById('donationamount').value);
		if (isNaN(donationamount)) donationamount = 0;
		var discountamount = parseInt(document.getElementById('discountamount').value);
		if (isNaN(discountamount)) discountamount = 0;	
		var oRadioInd = document.forms[0].elements['regcaseind'];
		var oRadioFam = document.forms[0].elements['regcasefam'];
		var oRadioChy = document.forms[0].elements['regcasechyk'];
		var chykCount = $('numchyk').options[$('numchyk').selectedIndex].value;
		var indCount = $('numind').options[$('numind').selectedIndex].value;
		var id, ie;
		var tag;
		var checkBox;
		var now = new Date();
		var criticaldate = new Date("April 30, 2012 23:59:59");
		var accommodation_fee = "<?php echo $accommodation_fee ?>";

		if(chykCount == "")
			chykCount = 0;
		else
		{
			chykCount = parseInt(chykCount);
		}

		if(indCount == "")
			indCount = 0;
		else
		{
			indCount = parseInt(indCount);
		}

		switch(regtype)
		{
			case 1:
			isteacher = parseInt($('isteacherind').options[$('isteacherind').selectedIndex].value);
			for(i = 0; i < oRadioInd.length; i++)
			{
				if (oRadioInd[i].checked == true)
				{
					regstate = parseInt(oRadioInd[i].value);
				}
			}
			break;
	
			case 2:
			isteacher = parseInt($('isteacherfam').options[$('isteacherfam').selectedIndex].value);
			for(i = 0; i < oRadioFam.length; i++)
			{
				if (oRadioFam[i].checked == true)
				{
					regstate = parseInt(oRadioFam[i].value);
				}
			}
			break;
	
			case 3:
			for(i = 0; i < oRadioChy.length; i++)
			{
				if (oRadioChy[i].checked == true)
				{
					regstate = parseInt(oRadioChy[i].value);
				}
			}
			break;
		}

		switch(regstate)
		{
			//Double occupancy
			case 1:
				if (regtype != 3)
				{
					if (regtype == 2)
					{
						//Family
						if (now <= criticaldate) 
							regvalue = 1300;
						else 
							regvalue = 1450;
						if (needaccommodation == 0)
							regvalue = regvalue - accommodation_fee;
					}
					else
					{
						//Individual
						if (indCount == 2)
						{
							if (now <= criticaldate) 
								regvalue = 1300;
							else 
								regvalue = 1450;
						}
						else
						{
							if (indCount == 1)
							{
								if (now <= criticaldate) 
									regvalue = 650;
								else 
									regvalue = 725;
								}
							else
							{
								regvalue = 0;
							}						
						}					
						
						if (needaccommodation == 0)
							regvalue = regvalue - accommodation_fee;
					}
				}
				else
				{
					switch (chykCount)
					{
						case 1:	
							if (now <= criticaldate) 
								regvalue = 585;
							else 
								regvalue = 652;
							break;
						case 2:	
							if (now <= criticaldate) 
								regvalue = 1170;
							else 
								regvalue = 1305;
							break;
						default:
							regvalue = 0;
							break;
					}					
					if (needaccommodation == 0)
						regvalue = regvalue - accommodation_fee;
				}
				break;
			//Triple occupancy
			case 2:
				if (regtype != 3)
				{
					if (now <= criticaldate)
						regvalue = 1600;
					else
						regvalue = 1750;
					break;
					if (needaccommodation == 0)
						regvalue = regvalue - accommodation_fee;
				}
				else
				{
					switch (chykCount)
					{
						case 1:	
							if (now <= criticaldate) 
								regvalue = 480;
							else 
								regvalue = 525;
							break;
						case 2:	
							if (now <= criticaldate) 
								regvalue = 960;
							else 
								regvalue = 1050;
							break;
						case 3:	
							if (now <= criticaldate) 
								regvalue = 1440;
							else 
								regvalue = 1575;
							break;
						default:
							regvalue = 0;
							break;
					}					
					if (needaccommodation == 0)
						regvalue = regvalue - accommodation_fee;
				}
				break;
			//Quad occupancy
			case 3:
				if (regtype != 3)
				{
					if (now <= criticaldate) 
						regvalue = 1750;
					else 
						regvalue = 1900;
					if (needaccommodation == 0)
						regvalue = regvalue - accommodation_fee;
				}
				else
				{
					switch (chykCount)
					{
						case 1:	
							if (now <= criticaldate) 
								regvalue = 394;
							else 
								regvalue = 427;
							break;
						case 2:	
							if (now <= criticaldate) 
								regvalue = 788;
							else 
								regvalue = 854;
							break;
						case 3:	
							if (now <= criticaldate) 
								regvalue = 1182;
							else 
								regvalue = 1281;
							break;
						case 4:	
							if (now <= criticaldate) 
								regvalue = 1575;
							else 
								regvalue = 1710;
							break;
						default:
							regvalue = 0;
							break;
					}					
					if (needaccommodation == 0)
						regvalue = regvalue - accommodation_fee;
				}
				break;
			//Single occupancy
			case 4:
				if (now <= criticaldate)
					regvalue = 1100;
				else
					regvalue = 1200;
				if (needaccommodation == 0)
					regvalue = regvalue - accommodation_fee;
				break;
			default:
				regvalue = 0;
		}

		for(id=1; id<=5; id++)
		{
			for(ie=2; ie<=3; ie++)
			{
				tag = String(id)+String(ie);
				checkBox = document.forms[0].elements['boption'+tag];
				if (checkBox.checked == true)
				{
					sponsoramount += 251;
				}
			}
		}
		
		for(id=1; id<=5; id++)
		{
			for(ie=1; ie<=3; ie++)
			{
				if (ie != 2)
				{
					tag = String(id) + String(ie);
					checkBox = document.forms[0].elements['aoption' + tag];
					if (checkBox.checked == true) {
						sponsoramount += 116;
					}
				}
			}
		}

		if (isteacher == 1) {
			tot_with_discount = regvalue + sponsoramount + donationamount - 100;
			divdisc.innerHTML = '<font color="red">$(100)<font>';
		}
		else {
			tot_with_discount = regvalue + sponsoramount + donationamount;
			divdisc.innerHTML = '$0';
		}
	
		if (discountamount > 0.01) {
			tot_with_discount = tot_with_discount - discountamount;
			divgendisc.innerHTML = '<font color="red">$('+discountamount+')<font>';
		}
		else {
			divgendisc.innerHTML = '$0';
		}

		if (tot_with_discount > 0.01)
			divtot.innerHTML = tot_with_discount;
		else
			divtot.innerHTML = 0;
	
		divreg.innerHTML = regvalue;
		divdon.innerHTML = donationamount;
		divspon.innerHTML = sponsoramount;
	}
	
	function countryHandler()
	{
		var $country = $('country').options[$('country').selectedIndex].value;
		
		if ($country == "NON") {
			$('stateUSA').hide();
			$('stateGlobal').hide();
		}
		else {
			if ($country == "US") {
				$('stateUSA').show();
				$('stateGlobal').hide();
			}
			else {
				$('stateGlobal').show();
				$('stateUSA').hide();
			}
		}
	}
</script>
